469,917 Members | 1,881 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,917 developers. It's quick & easy.

How to find the Max Date from the Table

Inbaraj
76
Hi...

I have a Table in that i have inserted the DATE as VARCHAR now in that i Want to get the Max Date. I am new to MySQL Plz help me how to find the max date.

with regard
Inbaraj.D
Feb 1 '08 #1
3 2638
amitpatel66
2,367 Expert 2GB
Hi...

I have a Table in that i have inserted the DATE as VARCHAR now in that i Want to get the Max Date. I am new to MySQL Plz help me how to find the max date.

with regard
Inbaraj.D
Could you please show which format the datas are stored in the table as varchar?....DDMMYYYY or MMDDRR??
Feb 1 '08 #2
Inbaraj
76
Could you please show which format the datas are stored in the table as varchar?....DDMMYYYY or MMDDRR??

hi..

It is stored in the MMDDYYYY format.

with reg
Inabraj.D
Feb 4 '08 #3
mwasif
802 Expert 512MB
This query will return the desired results
Expand|Select|Wrap|Line Numbers
  1. SELECT MAX(STR_TO_DATE(varchar_date, '%m%d%Y')) FROM table
Feb 9 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

9 posts views Thread by Simon Harris | last post: by
4 posts views Thread by SQLJunkie | last post: by
67 posts views Thread by PC Datasheet | last post: by
5 posts views Thread by Greg (codepug | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.