format date time combo on a form

J

John

Hi all.
Firstly thanks to all those that offer advise on these forums.
I am linking an access database to a csv file (that I pull out of contact
manager because linking the two directly doesn't show all fileds). Anyway, I
get a date value such as "dd/mm/yyyy hh:mm:ss AM" for one of the fields. Now
i would like to put just the date into a report "dd\mm\yyyy" but no matter
what i do, I always get the whole kit and kaboodle (i try mask etc). because
the original data is linked I cant modify it so I have to figure out a way to
do it on the report.
any Ideas?

thanks!!!
 
J

John

Just though I would add it is a text field and i think I have to use the
following commands??
using Left(), Mid(), and Right(), add DateSerial()

but i have no idea :( I think i should get a book
 
J

John Spencer

Try the following expression

=IIF(IsDate(TheField),DateValue(TheField),TheField)

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
J

John

Thanks John!!!!

I ended up just using datefield. but i see where you were going. I was
trying to use expression builder and it never seemed to work, but once i gave
it away and just typed it in it was perfect.
Cheers,
 

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