Home » RDBMS Server » Server Administration » How to retrieve the month from a date ?
How to retrieve the month from a date ? [message #374172] Tue, 29 May 2001 06:00 Go to next message
Roshan Cynthia
Messages: 1
Registered: May 2001
Junior Member
hi everybody,

I'm a beginner in Oracle. I'm doing a Project. I want to retrieve the month(i.e, in the format like January..) from a date function.

Actually i can able to retrieve the index of the month using the month(Sysdate) function.

for eg., getting the result 5 in the case of giving the function month(sysdate), b'cose now the month is may.
but i want to retrieve the month by name.

pls. help me in this regard.

advance thanx
Roshan cynthia.
Re: How to retrieve the month from a date ? [message #374173 is a reply to message #374172] Tue, 29 May 2001 06:05 Go to previous messageGo to next message
GIRIDHAR KODAKALLA
Messages: 92
Registered: May 2001
Member
Hai roshan,
Try this.
select to_char(sysdate,'MON') from dual;

Cheers,
Giridhar Kodakalla
Re: How to retrieve the month from a date ? [message #374197 is a reply to message #374172] Wed, 30 May 2001 02:49 Go to previous message
Sandeep P Dandekar
Messages: 3
Registered: October 2000
Junior Member
Try following SQL

select to_char(sysdate,'mm') from dual;
Previous Topic: wanna print emp name and manager under which he is working..
Next Topic: Using a Grant Sequence
Goto Forum:
  


Current Time: Mon Jul 01 03:47:53 CDT 2024