Converting a startdate (##/##/##) to a date including the weekday

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

Guest

I need help with a query. I have created a query that asks you to enter a
start date, ie, 06/04/07. How do I convert that date into a longer date,
Monday, June 4, 2007?
 
Pat said:
I need help with a query. I have created a query that asks you to enter a
start date, ie, 06/04/07. How do I convert that date into a longer date,
Monday, June 4, 2007?


Just set the Format property of the field or control that
displays the date:

dddd. mmmm d, yyyy
 
I need help with a query. I have created a query that asks you to enter a
start date, ie, 06/04/07. How do I convert that date into a longer date,
Monday, June 4, 2007?

A Date/Time field in Access is actually stored as a floating point number, not
a string. The date you specify is actually stored as 39237.000000000 (the
fractional portion is the time, 0 being midnight).

You can *display* this date any way you like by setting the Format of a
textbox in which it is displayed.

John W. Vinson [MVP]
 
I set format for the date to a long date which should be what I want and on
the query and report the date still shows as 6/4/07. Any I setting the
property incorrectly? The text box on the report says it should be a long
date but it shows a short date. Do I have to enter a long date when I am
prompted for the date. I don't think it will let me.
 
I set format for the date to a long date which should be what I want and on
the query and report the date still shows as 6/4/07. Any I setting the
property incorrectly? The text box on the report says it should be a long
date but it shows a short date. Do I have to enter a long date when I am
prompted for the date. I don't think it will let me.

The format *ONLY* affects the display, not what's stored. A Date/Time field in
a table is stored *as a number* - 39237.000000000 for June 4. It's not stored
as a short date, it's not stored as a long date, it's not stored as text -
it's stored AS A NUMBER.

If this isn't making sense, please doublecheck the datatype of the field in
table design view - *is* it a Date/Time, or is it Text? And explain where
you're setting the Format. You can have the same date/time field displayed
with half a dozen different formats in half a dozen different places if you
wish.

John W. Vinson [MVP]
 
Back
Top