Home All Groups Group Topic Archive Search About

Need to find day of week from a supplied date

Author
13 Feb 2006 7:26 PM
RSH
Hi,

Does anyone have a function that returns the day of week (Sun-Sat) from a
user supplied date (4/12/2006).

Thanks!
Ron

Author
13 Feb 2006 7:31 PM
Al Reid
"RSH" <way_beyond_o***@yahoo.com> wrote in message news:uWos0NNMGHA.3196@TK2MSFTNGP09.phx.gbl...
> Hi,
>
> Does anyone have a function that returns the day of week (Sun-Sat) from a
> user supplied date (4/12/2006).
>
> Thanks!
> Ron
>
>

Dim DayOfWeek As String = DateTime.Parse("4/12/2006").DayOfWeek.ToString



--

Al Reid
Author
13 Feb 2006 7:36 PM
RSH
Sorry...I meant to post this to the vb group...I need to do this in vb6

Thanks,
Ron


Show quoteHide quote
"RSH" <way_beyond_o***@yahoo.com> wrote in message
news:uWos0NNMGHA.3196@TK2MSFTNGP09.phx.gbl...
> Hi,
>
> Does anyone have a function that returns the day of week (Sun-Sat) from a
> user supplied date (4/12/2006).
>
> Thanks!
> Ron
>
Author
13 Feb 2006 7:37 PM
zacks
dim myDate as DateTime = "4/12/2006"

console.writeline myDateTime.ToString("ddd")

Look at the help topic on "Custom DateTime Format Strings".