I want Date Format

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
suneel kumar
Participant
Posts: 4
Joined: Fri Mar 03, 2006 4:31 am

I want Date Format

Post by suneel kumar »

Hi All,

i want dateformat.

Example:

Input(200603) here year month


output(20060301) Here year month day

here every time day start on 01 by default in output.

Thanks in advance,

suneel
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It's not clear WHERE you want the date, nor whether you want to generate dates.

Certainly converting from 200603 to 20060301 is very simple; you make use of the fact that there are no data types in server jobs, and concatenate the "01".

But I suspect there is more to your question than that. Do you, for example, need to generate a sequence of dates? If so, is it only for the month in question, or for a potentially longer period?

There are solutions to all these variants, but we would like to be fully cognizant of your actual requirement.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ameyvaidya
Charter Member
Charter Member
Posts: 166
Joined: Wed Mar 16, 2005 6:52 am
Location: Mumbai, India

Post by ameyvaidya »

Hi Suneel,
If the input is string (varchar or Char), You can just append the '01' to the end of the input.
IHTH
Amey Vaidya<i>
I am rarely happier than when spending an entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand.</i>
<i>- Douglas Adams</i>
Post Reply