Home » SQL & PL/SQL » SQL & PL/SQL » Truncate date string to mm/yyyy
Truncate date string to mm/yyyy [message #218547] Thu, 08 February 2007 10:49 Go to next message
sharaiqa
Messages: 7
Registered: February 2007
Junior Member
Hello Forum,

Does anyone know how to truncate a date string so that it will only return mm/yyyy using to_char

[Updated on: Thu, 08 February 2007 10:51]

Report message to a moderator

Re: Truncate date string to mm/yyyy [message #218549 is a reply to message #218547] Thu, 08 February 2007 11:00 Go to previous message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
to_char(<date_column>, 'MM/YYYY')

Of course, this is assuming the <date_column> is truly a DATE field.

[Updated on: Thu, 08 February 2007 11:01]

Report message to a moderator

Previous Topic: Preference: unique index or unique constraint?
Next Topic: Date time in my sql
Goto Forum:
  


Current Time: Sat Dec 10 07:05:07 CST 2016

Total time taken to generate the page: 0.12169 seconds