Trim Time off Date

G

GMC -LSND

Access 2007 linked to SQL 2008 database

I have a query with a date field that has the time included on it. How do I
trim, truncate, remove the time part of the date in the query field named
cndate?
 
J

John Spencer

I might use an expression like the following:

IIF(IsDate(cnDate),DateValue(cnDate),Null)

Or perhaps a bit faster
IIF(CNDate is Not null, DateValue(cnDate),Null)



John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
 
G

GMC -LSND

Neither one of those are producing anything. The field comes out with
nothing in it.
 
D

David W. Fenton

NEVER MIND!!! Brain isn't working. Your coding works.

I hate it when the brain isn't working.

I've found a good slap up-side the head seems to help.

Forehead, too. ;)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top