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

Format date on report

Status
Not open for further replies.

teebird

Technical User
Dec 11, 2001
239
Hi

I have a query that my report is based on. When the user opens the report, the query runs and prompt boxes ask for the dates.

Is it possible to format the date that appears on the report to 1 January 2003 instead of 01/01/03.

I have this in a textbox on my report.

Enter FROM date] & " And " & [Enter TO date]

Thanks
tee
 
No, you don't have:
Enter FROM date] & " And " & [Enter TO date]


You have
=[Enter FROM date] & " And " & [Enter TO date]

And you should have:


=Format([Enter FROM date],"dd mmmm yyyy") & " And " & format([Enter TO date], "dd mmmm yyyy")

Please read your previous posts(and answers) again.

Good luck



[pipe]
Daniel Vlas
Systems Consultant

 
Hey Daniel

Thanks for your reply....true I forgot the = when I copied and pasted the code.

Okay so now how do I get it to recoginze Australian dates

eg. dd/mm/yy and not mm/dd/yy

when my user inputs the dates TO and FROM in the query prompt box.

This is the line in my query criteria.

Between [Enter FROM date] And [Enter TO date]

Many thanks.
tee



 
If your parameters are passed directly to the query (ie they are placed in the Conditions row in the QBE grid, not passed through VB), the dates will be evaluated according to the Regional Settings of your computer (in Control Panel). To recognize dd/mm/yy, you have to go to:

Start
Control Panel
Regional Settings
Date

and change the short date format to dd/mm/yy

If you pass the parameters through VB, you must use the US format (mm/dd/yy), otherwise the dates will NOT be evaluated correctly.

That's all...

[pipe]
Daniel Vlas
Systems Consultant

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top