Hello
After executing an sql query, I get date & time in one column but I require date in 'dd-mm-yyyy' format, when I give : to_date(datefieldname, 'dd-mm-yyyy' ), time disappears, when I give : to_Char(datefieldname, 'hrs:mm:ss' ), date disappears. How to get both(date & time in one column)
Looking forward for an early reply.
Thanks
-
How to get date & time in one column? (2 messages)
- Posted by: p s
- Posted on: February 24 2005 11:38 EST
Threaded Messages (2)
- How to get date & time in one column? by Paul Morie on February 25 2005 13:26 EST
- How to get date & time in one column? by p s on February 26 2005 00:35 EST
-
How to get date & time in one column?[ Go to top ]
- Posted by: Paul Morie
- Posted on: February 25 2005 13:26 EST
- in response to p s
Hi-
In MySQL, there is a function called DATE_FORMAT which seems to be exactly what you need. If you are using a different database, there is probably something analagous, with a different name. Also, this is probably best suited for a different forum.
P -
How to get date & time in one column?[ Go to top ]
- Posted by: p s
- Posted on: February 26 2005 00:35 EST
- in response to Paul Morie
Hi Paul Morie
Thanks for info & ya, we need different forum for database.