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

Converting long date field to short date

Status
Not open for further replies.

rushdib

Programmer
Jun 12, 2001
203
US
Hi,
How do I convert a long date field to a short date field? (ex. 08/26/2002 12:06:00 to 08/26/2002)

Thanks in advance,

Rushdi
 
Hi!

Just set the format to short date and it will display as like you want. If you actually want to change the underlying data, though I can't think of any reason you would want to, then you can run an update query and set your field values: YourField = Int(YourField) and you will get only the date part of the field.

Note: You may need to do it like this YourField = CDbl(Int(YourField)) to avoid a type mismatch. As should be obvious, I haven't tested this.

hth
Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top