Connecting Tech Pros Worldwide Help | Site Map

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

  #1  
Old November 13th, 2005, 12:36 PM
S. van Beek
Guest
 
Posts: 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


  #2  
Old November 13th, 2005, 12:36 PM
fredg
Guest
 
Posts: n/a

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


On Thu, 30 Jun 2005 22:54:08 +0200, S. van Beek wrote:
[color=blue]
> 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[/color]

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.
  #3  
Old November 13th, 2005, 12:36 PM
Chuck Grimsby
Guest
 
Posts: n/a

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



Format$([Fieldname],"ddd")

or

Format$([Fieldname],"dddd")

or

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

......

And a few thousand other ways.

S. van Beek wrote:[color=blue]
> 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.[/color]

  #4  
Old November 13th, 2005, 12:37 PM
Mike Preston
Guest
 
Posts: n/a

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


On Thu, 30 Jun 2005 22:54:08 +0200, "S. van Beek" <S.v.Beek@HCCnet.nl>
wrote:
[color=blue]
>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.[/color]

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

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 0 November 14th, 2005 08:57 PM
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 0 November 14th, 2005 07:46 PM
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 0 November 14th, 2005 03:55 PM
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 5 November 14th, 2005 12:36 PM