Hi,
Thanks a lot for the speeedy response.
I have tried this. However, I am likely to receive the date in the DD-MON-YY
format from the frontend. And the MySql Manual doesnt mention any function
which will format a given string and convert it to date. Hence, the query.
Incase there is no go, then I shall just proceed to check whether I can do
the required formatting in the frontend before passing it to MySql.
Vaishali

> -----Original Message-----
> From: Almar van Pel [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, December 20, 2001 4:46 PM
> To:   Vaishali Vaidya
> Subject:      RE: Date Format Query
> 
> Hi,
> 
> Try this:
> 
> Select date_format('2001-12-11', '%d %m %Y') Mysql stores dates in YYYY MM
> DD format.
> 
> I suggest you take a look @ the manual:
> 
> http://www.mysql.com/doc/D/a/Date_and_time_functions.html
> 
> Regards,
> 
> 
> Almar van Pel
> 
> 
> -----Oorspronkelijk bericht-----
> Van: Vaishali Vaidya [mailto:[EMAIL PROTECTED]]
> Verzonden: donderdag, december 20, 2001 11.44
> Aan: [EMAIL PROTECTED]
> Onderwerp: Date Format Query
> Urgentie: Hoog
> 
> 
> Hi,
> I am a new user to MySql, and have recently installed version
> 3.23.25-beta.
> I have a date string of the type 'DD-MON-YY' (for Oracle Users) (Eg.
> 20-DEC-01')
> If I try to insert this into a date field in the table, either as it is,
> or
> via the DATE_FORMAT function, it inserts a NULL
> Even when I try to "Select DATE_FORMAT('20-DEC-01', '%d-%m-%Y')" it
> returns
> a Null.
> If I convert this as 20-12-01, it returns a 01-12-2020.
> Please let me know how to interpret such date strings for inserting into
> the
> database, as also whether there is an equivalent of TO_DATE() from Oracle
> in
> MySql.
> -Vaishali
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
> <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to