Home » SQL & PL/SQL » SQL & PL/SQL » SQL Query
SQL Query [message #214779] Thu, 18 January 2007 01:08 Go to next message
romi
Messages: 67
Registered: October 2006
Member

How can i find the day of date:-

like, in emp table , there is hiredate column in which date has given.I want to find the day(sunday,monday,.......) of that date.Which day was on that date?How can i find it?

thanks
Re: SQL Query [message #214781 is a reply to message #214779] Thu, 18 January 2007 01:10 Go to previous messageGo to next message
dhananjay
Messages: 635
Registered: March 2002
Location: Mumbai
Senior Member
hi,

hint : use to_char  


regards,
Re: SQL Query [message #214791 is a reply to message #214779] Thu, 18 January 2007 01:55 Go to previous messageGo to next message
romi
Messages: 67
Registered: October 2006
Member



Thank u dhananjay to reply me but can u make it more clear.how it's possible with to_char.
Re: SQL Query [message #214792 is a reply to message #214791] Thu, 18 January 2007 02:03 Go to previous message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
romi wrote on Thu, 18 January 2007 08:55



Thank u dhananjay to reply me but can u make it more clear.how it's possible with to_char.
It's an excellent hint.

TO_CHAR can convert numbers/dates to varchar2. Now, since dates don't have a real format (they are stored in their own -internal- format) it is you who choose the format. Instead of copying the manual, I'll just link to it here.

Format models.

Let's see if you can figure it out. If not, don't hesitate to post what you tried.

MHE
Previous Topic: how to check data type and length
Next Topic: How to insert milliseconds in date field?
Goto Forum:
  


Current Time: Thu Dec 08 19:56:53 CST 2016

Total time taken to generate the page: 0.09107 seconds