3 character abbrevation for month in date

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Deepakinstyle
Participant
Posts: 47
Joined: Wed Apr 18, 2007 4:49 am

3 character abbrevation for month in date

Post by Deepakinstyle »

Hi All,

My input is sysdate from dual table(i am using ORACLE enterprise stage).
next stage i have a transformer where i am passing some hardcoded message and concatinating this date(sysdate) to one stored procedure stage, which will pass the above message to some table. The message should appear as eg: if sysdate is 22/08/2008 and my message should be xxxxyyyy for 22-AUG-2008.

please give your inputs.

Thanks,
Deepak
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Code: Select all

select to_char(sysdate,'DD-MON-YYYY') from dual
-craig

"You can never have too many knives" -- Logan Nine Fingers
Deepakinstyle
Participant
Posts: 47
Joined: Wed Apr 18, 2007 4:49 am

Post by Deepakinstyle »

chulett wrote:

Code: Select all

select to_char(sysdate,'DD-MON-YYYY') from dual
...
Thanks Chulett.

I got the required format but now i have DD-mon-YYYY.
can i get the output as DD-MON-YYYY
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:? My example showed that. "MON" = upper-case three character month, "mon" = lower-case. Pick whichever you like.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Deepakinstyle
Participant
Posts: 47
Joined: Wed Apr 18, 2007 4:49 am

Post by Deepakinstyle »

chulett wrote::? My example showed that. "MON" = upper-case three character month, "mon" = lower-case. Pick whichever you like. ...
I got month as MON from dual. but when i have inserted this date into the table there am getting as 22-aug-2008.

can i have this as 22-AUG-2008

Thanks,
Deepak
Deepakinstyle
Participant
Posts: 47
Joined: Wed Apr 18, 2007 4:49 am

Post by Deepakinstyle »

Deepakinstyle wrote:
chulett wrote::? My example showed that. "MON" = upper-case three character month, "mon" = lower-case. Pick whichever you like. ...
I got month as MON from dual. but when i have inserted this date into the table there am getting as 22-aug-2008.

can i have this as 22-AUG-2008

Thanks,
Deepak
Thanks Chulett. I got it correct finally.

Thanks for your suggestions
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ok, good. Saves me from going into my lecture on how Oracle dates are not stored in any format and what they look like when selected is up to you or your tool of choice. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Has anyone else noticed that Oracle is an anagram of "Orc Ale"? And is occasionally misspelled thus?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:lol: No, can't say that I have.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply