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

Date formating in query or report

Status
Not open for further replies.

tjisaacs

Technical User
Jan 17, 2002
13
US
I have a database using several different data sources, of course all three have different date formats. the date formats will not change when I change properties on the report to medium date. Can I change the data by formating the query behind the report?

Help please
 
Why not?

You could do something like:

SELECT Format([txdate],"Long Date") AS newDate
FROM tblTransactions;


or

SELECT Format([txdate],"Short Date") AS newDate
FROM tblTransactions;
Robert Berman
Data Base consultant
Vulcan Software Services
thornmastr@yahoo.com
 
Hi Tjisaacs,

Formatting a date-field in a query works like this:

SELECT Format([TabelName]![FieldOfTypeDate],"dd/mm/yyyy") AS FormattedDate, ' other fields needed'
FROM . . . . . etc.
"dd/mm/yyyy" would become for example 01-02-2002 (february 1st, 2002.

Look in VBA Help for Format. You can choose any exotic format you like. Use de Build-function in your query window.

Perhaps even a better tip is to format the controls, containing dates on your report.

Good luck, Bart Verlaan.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top