Can anybody please tell me how i can find out what day of the week its is from a date string.
Thanks
dave
Printable View
Can anybody please tell me how i can find out what day of the week its is from a date string.
Thanks
dave
You can use the format function to get the numeric day of the week with the following code:
After this runs day of week will contain 1-7 for Sunday - Saturday. :)Code:
dim dayofweek as string
dayofweek = format$(now(),"w")
Use VB function WeekDay():
i = WeekDay(SomeDate)
There just too many functions to remember them all. :) Alfred is definitely correct the weekday function is what you want.