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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

change dates from numeric to text

Status
Not open for further replies.

TracyYu

Technical User
Feb 9, 2004
17
US
I have a query, which prompts user for "starting date" and "ending date", for both, user enter in "mm/dd/yyyy" format.

I have a report which uses the above query. in the report I need to show the "starting date" and "ending date" as follow:

Month(starting date) TO Month(ending date) Year(ending date)

output look like this: 1 TO 9 2004

now, the Month() function only gives numeric output, how can I make the above shown as following (say I use 1/1/2004 as starting date and 9/1/2004 as ending date):

January TO September 2004



any suggestions anyone?

thanks for your time [cheers]
 
You are using a form to collect the dates?

Any way, you can use this:

format ([StartDate], "MMMMM") & " To " & format ([EndDate], "MMMMM YYYY")

That will display as you listed above.

ChaZ

Ascii dumb question, get a dumb Ansi
 
thank you for your help. I don't understand your question, let me briefly explain why I asked this question: user is prompted to enter the date range, the report prints out records between date range given by the user. the user wants the date range to be shown in the text format, so...

I'm very new with the MS Access, would you please point out where should I add the format command?

thanks again.

 
Thank you very much!!! I got it!!!
 
Cool. Glad to help.

Ascii dumb question, get a dumb Ansi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top