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

converting text to date in access

Status
Not open for further replies.
Jun 1, 2006
58
US
Hi all

I have a column in ms access which is supposed to represent date/time. It is in this way

feb 19 2003 12:00 am.
mar 23 2001 12:00 am.

It is stored a text field. I am trying to get the latest dates from this column , but by using the max(date) function I get the latest as march 23 instead of feb. so, access is giving a higher priority for month and then data and then finally the year.

I tried using the convert function, but access does nt recognise it. can you guys help me get the latest date among these two?

thanks a lot
 
You need the FORMAT function (you may need to trim off time component first, not sure). Format your date to YYYYMMDD and it will sort properly, even as text.

More importantly, you need to post here: forum701

Hope this helps,

Alex

Ignorance of certain subjects is a great part of wisdom
 
Are you sure that is the right forum to ask?
This is SQL Server forum, maybe you should ask in Access forum.

Borislav Borissov
VFP9 SP1, SQL Server 2000/2005.
MVP VFP
 
thanks a lot ppl..format worked great

will remember to post in right forum next time
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top