cancel
Showing results for 
Search instead for 
Did you mean: 

Date & Time Conversion

praveenreddy_bk
Participant
0 Kudos

Hi,

1) Convert from YYYY-MM-DDTHH:MM:SS+HH:MM to DDMMYY

2) Convert from YYYY-MM-DDTHH:MM:SS+HH:MM to YYYYMMDDHHMMSS

V can use standard date function or else V Need to write any UDF .

Thanks in Advance.

Accepted Solutions (1)

Accepted Solutions (1)

former_member200962
Active Contributor
0 Kudos

Hi,

there is a standard Date-Transform function available in the message mapping which you can use...no need of an UDF for this:)

Use the below logic in your mapping:

1) Convert from YYYY-MM-DDTHH:MM:SS+HH:MM to DDMMYY

SourceField --> Substring(0..10) --> DateTransform --> TargetField

Datetransform properties:

Format of SourceDate: yyyy-MM-dd

Format of target date: ddMMyy

2) Convert from YYYY-MM-DDTHH:MM:SS+HH:MM to YYYYMMDDHHMMSS

SourceField --> Substring(0..10)-->
			     Concat --> DateTransform --> TargetField
SourceField --> Substring(11..19)-->

Datetransform properties:

Format of SourceDate: yyyy-MM-ddHH:mm:ss

Format of target date: yyyyMMddHHmmss

The substring function is used to remove "T" between date&time...as it will give an error

Regards,

Abhishek.

Answers (1)

Answers (1)

dharamveer_gaur2
Active Contributor
0 Kudos

Hi

Use DateTransform function.