Click here to Skip to main content
15,889,116 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
Please help i want to insert Date & time with AM or PM format using trigger
in oracle please give solution anybody know

This Format

19-SEP-2011 12:09:20 PM
Posted

Use TO_CHAR(yourfield, 'DD-MON-YYYY HH:MI:SS AM') while selecting.
or use TO_DATE(19-SEP-2011 12:09:20 PM', 'DD-MON-YYYY HH:MI:SS AM') in insert.
 
Share this answer
 
v2
Comments
Bhaumik Lathia 19-Sep-11 6:30am    
but dear i don't know that time is AM or PM
Prerak Patel 19-Sep-11 6:48am    
Doesn't matter, it's just a format. Did you try?
Hello,

Please refer : http://ss64.com/ora/syntax-fmt.html[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900