Hello,
Can anyone help me!!!
2008-07-06 16:46:15
2008-07-06 16:47:44
2008-07-06 10:18:25
2008-07-24 14:38:25
If these are the records in a table i need to get the output like this:
2008-07-06
2008-07-24
Please help
Date extracting function in SQL
Moderator: General Moderators
-
vcodeinfotec
- Forum Newbie
- Posts: 10
- Joined: Sat Jul 12, 2008 2:08 am
-
sureshmaharana
- Forum Commoner
- Posts: 30
- Joined: Thu Jul 03, 2008 4:20 am
- Contact:
Re: Date extracting function in SQL
Try this:
SELECT date_format( Date, '%Y-%m-%d' ) AS date
FROM table name
where Date is your table's field name.
SELECT date_format( Date, '%Y-%m-%d' ) AS date
FROM table name
where Date is your table's field name.