Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Day of the Week

Status
Not open for further replies.

DrLAG

Technical User
Aug 21, 2003
3
0
0
GB
I'm a newbie to all things databasey and I'm attempting to create a Time Sheet in MS Access. I've created a form already with appropriate fields on it but I'd like to improve the date input facility.

One thing I'd like to do is display the Day of the week, ie Monday, Tuesday etc in a field (or label) to help clarify the Date inputted. There will be an initial field where I would input '23/07/04' for example, this info would then be used to calculate the disired 'DayOtTheWeek' field accordingly.

I've looked at the 'datepart' function but it doesn't seem to do what I'm after. Surely something like DOTW is a simple operation, I must be missing something.

If anyone has any ideas on how to do this I'd be grateful.

Many thanks

Marc
 
Take a look at the Format function:
MsgBox Format(Date(), "dddd")

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks for the reply.
I'd be grateful if you would be able to explain how and in which field I input your suggestion.

I looked up the 'format' command and saw the "dddd" you mentioned. I added 'dddd' into the 'format' property of a Text Box control and sure enough the Day of the week was displayed. However, I was able to edit this same box though, something I'd prefer not to do, ie. it's read only and simply changes when the original date field is modified. Do you have any thoughts on that?

Thanks again.

Marc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top