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

Date selection query - creating a new field

Status
Not open for further replies.

fenneraj

Programmer
Jul 29, 2003
21
SE
Hi all,
I have a query in Access that takes all the information from one table and displays it, there is one field that i need to query and display the results of the query in the output. I currently have a last_update field which shows the last update date and time (19/02/2004 19:56:34). I need to build a query that will pull out the date only and display it as though it were a new field. I know i can pull the exact data into a new field using this query:

D_MOD: [tbl_Xtra_MED]![Last_Update]

Can anyone elaborate on this to provide with the date only, and not the time object.

FYI - Last_Update is a text field, therefore a string is contained within it, not a General Date. (i do not have the relevant permission to change this).

Regards
Andrew Fenner
 
D_MOD: Format([tbl_Xtra_MED]![Last_Update],"dd/mm/yyyy")

This will only work if the string is formatted like the Regional Settings.

D_MOD: Left([tbl_Xtra_MED]![Last_Update], 10)

This will only work if day and month are always 2 digit numbers and the year is a 4 digit number.

HTH



[pipe]
Daniel Vlas
Systems Consultant

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top