Todays Day

K

Kay

Hi

Does anyone know how I can display todays day in a text box on a form.
I know I have to set it as the default value but Ive tried today(),
day(), Now() etc but they bring the dates and times.

Any help please
 
D

Douglas J. Steele

I may have misread this.

Are you saying you only want the day, not the month and year?

What do you mean by "day": 1, 2, 3, 4, to 28, 29, 30, 31, or Monday,
Tuesday, Wednesday, etc?

For the former, you can use either DatePart("d", Date()) or Format(Date(),
"dd") (DatePart returns a number, Format returns a string)

For the latter, Format(Date(), "ddd") will return Mon, Tue, Wed, while
Format(Date(), "dddd") will return Monday, Tuesday, Wednesday.
 
G

Graham R Seach

Kay,

In addition to Doug's excellent response, here is another way to return the
day name:
WeekDayName(WeekDay(dteMyDate))

Regards,
Graham R Seach
Microsoft Access MVP
Canberra, Australia
 
Top