Date Format

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
mydsworld
Participant
Posts: 321
Joined: Thu Sep 07, 2006 3:55 am

Date Format

Post by mydsworld »

I am trying to generate date in format YYYYMMDD as required by SAP.

Transformation derivation like

StringToDate(DateToString(CurrentDate(),"%yyyy%mm%dd"),"%yyyy%mm%dd")

gives date in the form YYYY-MM-DD

Please advise.
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

set the default date format for that column to YYYYMMDD
mydsworld
Participant
Posts: 321
Joined: Thu Sep 07, 2006 3:55 am

Post by mydsworld »

Where it is to be done, at the DS level or database level.
ShaneMuir
Premium Member
Premium Member
Posts: 508
Joined: Tue Jun 15, 2004 5:00 am
Location: London

Re: Date Format

Post by ShaneMuir »

mydsworld wrote:I am trying to generate date in format YYYYMMDD as required by SAP.

Transformation derivation like

StringToDate(DateToString(CurrentDate(),"%yyyy%mm%dd"),"%yyyy%mm%dd")

gives date in the form YYYY-MM-DD

Please advise.
Do you really need the output as a date format? Can it just be a string? I would have thought that SAP is not actually expecting a date formatted column rather just a string representing a date?

If its just a string then a simple convert function will work to remove the '-'
Post Reply