format date

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

Guest

I would like to format the shown date.
Now I see 7 april 2007
I would like to see only the month and the year and always starting with the
folowing month.
For example: Todays date is 7 april 2007 I would like to see may 2007. If
todays date would be 27 may 2007 I would like to see June 2007.
Can someone tell me how?
Thanks
Klaus
 
Amateur said:
I would like to format the shown date.
Now I see 7 april 2007
I would like to see only the month and the year and always starting
with the folowing month.
For example: Todays date is 7 april 2007 I would like to see may
2007. If todays date would be 27 may 2007 I would like to see June
2007.
Can someone tell me how?
Thanks
Klaus

Format(DateSerial(Year(Date()), Month(Date())+1,1),"mmmm yyyy")
 
Thanks, but maybe I explained not correct. I need this in a query.
The query field is in the momnt: NOW(). That shows the date of today. In the
format I wrote mmmm yyyy - and it shows only the month and year. Iwould like
something like this mmmm yyyy +1 so that it shows the following month - is
that possible and how?
Your format line is not working - any other idea?
Thanks
Klaus
 
Thanks, but maybe I explained not correct. I need this in a query.
The query field is in the momnt: NOW().

Incorrect.

Now() is NOT today's date. It is the current date and time, accurate to a few
microseconds, stored as a Double Float number - a count of days and fractions
of a day since midnight, December 30, 1899.
That shows the date of today. In the
format I wrote mmmm yyyy - and it shows only the month and year. Iwould like
something like this mmmm yyyy +1 so that it shows the following month - is
that possible and how?

Don't confuse data PRESENTATION - formatting - with data STORAGE.

If you are using this value as a search criterion on a date field, then the
Format of either the table field or of the criterion *is completely
irrelevant*. What's stored, and searched, is the double float numeric value. A
date is NOT a text string!

A criterion of Now() - no matter HOW it's formatted - will find only those
records where the date field contains the exact value #4/10/2007 09:49:31#.

What are you trying to ACCOMPLISH? Do you want the query to find all records
where the date field falls during May 2007? If so, your criterion should be
= DateSerial(Year(Date()), Month(Date()) + 1, 1) AND < DateSerial(Year(Date()), Month(Date()) + 2, 1)

to select all date values during that range of dates.

John W. Vinson [MVP]
 
Back
Top