convert Date to Day

Sturmtruppe

Registered User.
Local time
Today, 13:13
Joined
Mar 26, 2009
Messages
18
I have a table with a 'Date' field & 'Day' field. The 'Date' field will always be the current date so the default value is Date(), but i have spent all morning trying to figure how to get the current day displayed in the 'Day' field.

In access 2003 is there a similar function like Date() that displays the current day for my table? I also have planned to make a form to enter the information, so failing that, would there be any code i can use on the 'Day' field that automatically enters the day like a default value ontrol.

thanks

Darren
 
format(mydate,"ddd") gives mon, tue etc
format(mydate,"dddd") gives monday, tuesday etc

a slightly differnet tack
weekday(mydate) gives a number in the range 1 to 7 - programmatically this number can be handled as vbMonday, vbTuesday etc

so you can say

if weekday(anydate) = vbsunday then ,,,,,
 
Would something like the following work:

weekdayname(datepart("w",1/1/2009))

??
 

Users who are viewing this thread

Back
Top Bottom