Urgent [message #372785] |
Fri, 09 March 2001 09:30 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Bobby
Messages: 32 Registered: August 2000
|
Member |
|
|
I want to get datetime from a table. I'm using the following query.
select to_char(datetime,'dd-mm-yyyy hh:mm:ss') from table_name.
This query returns me a single time .ie 12.06.00.
How to get the different times along with dates.
Its urgent
|
|
|
|
|
|
Re: Urgent [message #372792 is a reply to message #372785] |
Fri, 09 March 2001 11:25 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Gerard Vaz
Messages: 9 Registered: September 1999
|
Junior Member |
|
|
Try setting the NLS_DATE_FORMAT parameter as follows at the SQL prompt
SET NLS_DATE_FORMAT='DD-MON-YYYY HH:MI:SS'
and then run your query.
Hope this helps.
|
|
|
Re: Urgent [message #372793 is a reply to message #372785] |
Fri, 09 March 2001 11:35 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Gerard Vaz
Messages: 9 Registered: September 1999
|
Junior Member |
|
|
Hi there!
I just noticed that your date picture format is incorrect. Instead of DD-MM-YY HH:MI:SS you have DD-MM-YY HH:MM:SS. The MM in the time format will return you the month.
Please let me know if your problem is solved.
|
|
|
Re: Urgent [message #372817 is a reply to message #372785] |
Sun, 11 March 2001 23:39 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
vishal gupta
Messages: 111 Registered: March 2001
|
Senior Member |
|
|
Gerard Vaz
DD-MM-YY HH:MI:SS is the correct date picture format. If you use DD-MM-YY HH:MM:SS then month will be rreturned instead of minute.
Vishal Gupta
|
|
|