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

Date only from a Access Database 1

Status
Not open for further replies.

scottydd

IS-IT--Management
Sep 19, 2002
31
0
0
US
I'm trying to figure out how to convert a DATE/TIME field in Access to just a Date using a select statement. Any help would be appreciated.
 
What is the format of the Date/Time field?

Everything I know I learned from The Grateful Dead and Buffy The Vampire Slayer
Charlie
 
SELECT tbl.Last_Activity_Date, Format([Last_Activity_Date],'m/d/yyyy') AS DateOnly
FROM tbl;

Format is a function in Access that can convert the date to a different format.

Hope this helps.

Hope everyone is having a great day!

Thanks - Jennifer
 
Often, this is done by using format strings on the business layer (to take the processing load off of the database server).

Certain controls, like the DataGrid, have the format string handling functionality built in (via the Data formatting expression), and the .ToString() method accepts a format string as an optional argument.

See here:

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top