Home » SQL & PL/SQL » SQL & PL/SQL » syntax error
syntax error [message #261012] Tue, 21 August 2007 09:23 Go to next message
qasim845
Messages: 95
Registered: March 2007
Location: Philadelphia
Member

select to_date('02-feb-2007' || '15:10:59', 'dd-mon-yyyy hh24:mi:ss') from dual



If i need to exclude the PM in the final output of to_date function, how I write this syntax..

Thanks in advance

[Updated on: Tue, 21 August 2007 09:31]

Report message to a moderator

Re: syntax error [message #261016 is a reply to message #261012] Tue, 21 August 2007 09:27 Go to previous messageGo to next message
BlackSwan
Messages: 25045
Registered: January 2009
Location: SoCal
Senior Member
Rhetorical question....
>'15:10:59 AM'

What in the world is 15 hours AM????????????????????
Re: syntax error [message #261020 is a reply to message #261012] Tue, 21 August 2007 09:34 Go to previous messageGo to next message
BlackSwan
Messages: 25045
Registered: January 2009
Location: SoCal
Senior Member
Changing the original post after a response is provided is VERY misleading!
Re: syntax error [message #261029 is a reply to message #261020] Tue, 21 August 2007 09:44 Go to previous messageGo to next message
qasim845
Messages: 95
Registered: March 2007
Location: Philadelphia
Member

Sorry dude, that was wrong question. THis is the question i need to exclude the Am or Pm from to_date function ...
Re: syntax error [message #261031 is a reply to message #261012] Tue, 21 August 2007 09:47 Go to previous messageGo to next message
BlackSwan
Messages: 25045
Registered: January 2009
Location: SoCal
Senior Member
>Sorry dude, that was wrong question. THis is the question i need to exclude the Am or Pm from to_date function ...

HUH?


SQL> select to_date('02-feb-2007' || '15:10:59', 'dd-mon-yyyy hh24:mi:ss') from dual;

TO_DATE('02-FEB-200
-------------------
2007-02-02 15:10:59

Re: syntax error [message #261046 is a reply to message #261031] Tue, 21 August 2007 10:42 Go to previous messageGo to next message
qasim845
Messages: 95
Registered: March 2007
Location: Philadelphia
Member

i need to exclude AM or PM in the output of to_date function.... Not include please ...

[Updated on: Tue, 21 August 2007 10:42]

Report message to a moderator

Re: syntax error [message #261050 is a reply to message #261046] Tue, 21 August 2007 10:55 Go to previous message
Michel Cadot
Messages: 64132
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Where do you see AM/PM in Ana's post?

Regards
Michel
Previous Topic: Using PL/SQL to generate List to match Records
Next Topic: Sending Outlook Calender mail
Goto Forum:
  


Current Time: Wed Dec 07 16:32:50 CST 2016

Total time taken to generate the page: 0.22463 seconds