Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Thread Tools Search this Thread
Old 05-06-2009
Join Date: Apr 2009
Posts: 21
vb.net date dayofweek

I am using VB.net & need to get the date of the two specific days of a week. I don't find any way to find that better then the DateTime.Now by looping incrementing/decrementing by day unless you reach the Day of the week

Does anyone know the better option??? Please Help.....!
Reply With Quote
Old 05-06-2009
Join Date: May 2008
Posts: 2,383
Re: vb.net date dayofweek

The. NET Framework makes it easy to order assigned day of the week for a certain date, and the localized weekday name for a certain date to show. The listed value on the day of the week points to a certain date answers are available from the possession or dayofweek. In contrast, the recovery of the weekday name of a formatting operation that can be executed by a formatting method, such as date and time value creation; ToString method or the method String.Format.
Reply With Quote
Old 05-06-2009
Join Date: Apr 2008
Posts: 1,948
Re: vb.net date dayofweek

Syntax :

DayOfWeek variable = DateTime.Now.DayOfWeek;
string d1 = DateTime.Now.DayOfWeek.ToString();
Reply With Quote
Old 05-06-2009
Join Date: May 2008
Posts: 2,293
Re: vb.net date dayofweek

See the code Below Hope this is Helpful......!

Module Module1

    Sub Main()
        Dim DayOfWeek As Integer
        DayOfWeek = Now.DayOfWeek

        Select Case DayOfWeek
            Case 1
            Case 2
            Case 3
            Case 4
            Case 5
            Case 6
            Case 7
        End Select
    End Sub

End Module
Reply With Quote

  TechArena Community > Software > Software Development
Tags: , ,

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads for: "vb.net date dayofweek"
Thread Thread Starter Forum Replies Last Post
error message: cant login This computer date/time is not synchornize with the date/time of network fazalhassan Networking & Security 2 29-11-2011 09:29 AM
Baseline Column Date automatically updates Finish Date Adam 1980 Microsoft Project 3 18-05-2011 06:08 PM
Using date format in JSP KAMANA Software Development 6 29-07-2010 10:32 AM
USB 3.0 release date Dhiresh Portable Devices 3 19-08-2009 09:32 PM
Changing start date and creating formula for finish date stringse Microsoft Project 1 11-09-2006 01:13 PM

All times are GMT +5.5. The time now is 01:44 AM.