By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,655 Members | 1,860 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,655 IT Pros & Developers. It's quick & easy.

How to display (print) the day of the week for a date field

P: n/a


Dear reader,

I need to know which day of the week belongs to a date field.

30 June 2005 is Thursday

There is a function Datepart("ww";[Fieldname])

But how can I display the day of the week for a datefield.

Datepart("day";([Fieldname]) comes back with a error.

Thanks for any help.

Kind regards,

Simon van Beek
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Thu, 30 Jun 2005 22:54:08 +0200, S. van Beek wrote:
Dear reader,

I need to know which day of the week belongs to a date field.

30 June 2005 is Thursday

There is a function Datepart("ww";[Fieldname])

But how can I display the day of the week for a datefield.

Datepart("day";([Fieldname]) comes back with a error.

Thanks for any help.

Kind regards,

Simon van Beek


Not clear what you want.
Are you wanting to print the word "Thursday"?

=Format([DateField],"mmmm")

Are you wanting to print a 5 (if the date is a Thursday, and the first
day of the week is Sunday).?

=DatePart("w",[DateField])

This information is all available in VBA Help.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 13 '05 #2

P: n/a

Format$([Fieldname],"ddd")

or

Format$([Fieldname],"dddd")

or

Format$(Weekday([Fieldname]),"dddd")

......

And a few thousand other ways.

S. van Beek wrote:
I need to know which day of the week belongs to a date field.
30 June 2005 is Thursday
There is a function Datepart("ww";[Fieldname])
But how can I display the day of the week for a datefield.
Datepart("day";([Fieldname]) comes back with a error.


Nov 13 '05 #3

P: n/a
On Thu, 30 Jun 2005 22:54:08 +0200, "S. van Beek" <S.******@HCCnet.nl>
wrote:
Dear reader,

I need to know which day of the week belongs to a date field.

30 June 2005 is Thursday

There is a function Datepart("ww";[Fieldname])

But how can I display the day of the week for a datefield.

Datepart("day";([Fieldname]) comes back with a error.


Try Datepart("w",[Fieldname])

This will return a number from 1 to 7. If that number is 1, it is
Sunday, 2, Monday, etc.

See help on "Datepart"

mike

Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.