472,126 Members | 1,571 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,126 software developers and data experts.

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 2717
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 leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.