Day of the Week

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am a self tought novice with Access. I have built a Database which we use
to track IED (Improvised Explosive Devices) emplacements. I have finished
inputting several months of historical data. We have dates for these IED
discoveries and detonations. I am trying to figure out how I can have a
query give me the day of the week, i.e. Monday, Tuesday, etc givent he date
as input. Can anyone help me out. Thank you.
Captian Ben Marnell
 
Check Help on the Format() function or Format property. You might need to
open a module and then Help to get function help.
 
I am a self tought novice with Access. I have built a Database which we use
to track IED (Improvised Explosive Devices) emplacements. I have finished
inputting several months of historical data. We have dates for these IED
discoveries and detonations. I am trying to figure out how I can have a
query give me the day of the week, i.e. Monday, Tuesday, etc givent he date
as input. Can anyone help me out. Thank you.
Captian Ben Marnell

Just set the Format property of a textbox on a form or report to

dddd

to show just the weekday name, or

dddd, mm/dd/yyyy

to show Thursday, 11/17/2005

And... accept my thanks from a grateful civilian, and I sure hope your
database becomes of only historical interest soon.

John W. Vinson[MVP]
 
in message
I am a self tought novice with Access. I have built a Database which we use
to track IED (Improvised Explosive Devices) emplacements. I have finished
inputting several months of historical data. We have dates for these IED
discoveries and detonations. I am trying to figure out how I can have a
query give me the day of the week, i.e. Monday, Tuesday, etc givent he date
as input. Can anyone help me out. Thank you.
Captian Ben Marnell

Captian Ben Marnell,

The DatePart() and Format() functions could cover that.

DatePart("w", Now()) = 5

1 = Sunday
..
..
..
7 = Saturday


Format(Now(),"dd") = "17"
Format(Now(),"ddd") = "Thu"
Format(Now(),"dddd") = "Thursday"
Format(Now(),"ddddd") = "11/17/2005"
Format(Now(),"dddddd") = "Thursday, November 17, 2005"


Sincerely,

Chris O.

PS Good luck.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top