Cropping Dates

  • Thread starter Thread starter Nina
  • Start date Start date
N

Nina

Hey Guys,

I want to state the name of the forthcoming month at the top of a report. At present i have

SELECT (Month(Date())) AS Expr1

which gives me the right month in numerical format...... but rather than display a 5 i want to show 'May'.

Is this possible with minimal hassle and not going round the houses to get there??

Thanks
 
Hey Guys,

I want to state the name of the forthcoming month at the top of a report. At present i have

SELECT (Month(Date())) AS Expr1

which gives me the right month in numerical format...... but rather than
display a 5 i want to show 'May'.
Is this possible with minimal hassle and not going round the houses to get there??

Thanks


format(DateSerial(2004, 5, 1), "mmm")

Output:

May

Or:

format(<your-date-expression>, "mmm")


Sincerely,

Chris O.
 
Hey Guys,

I want to state the name of the forthcoming month at the top of a report. At present i have

SELECT (Month(Date())) AS Expr1

which gives me the right month in numerical format...... but rather than display a 5 i want to show 'May'.

Is this possible with minimal hassle and not going round the houses to get there??

Thanks

If all you wish to do is show the name of the current month in the
report, why do it in the query?

In your report, add an unbound control.
Set it's control source to:
= Date()
Set it's format property to
mmmm

It will display the full name of the month.
If you wish only 3 letters, then use
mmm
 
Back
Top