cancel
Showing results for 
Search instead for 
Did you mean: 

Date

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

Here TimeStamp Begins with T

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

Thanks in Advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

I dont think it can be converted using standard dataTrans function, write UDF for this.

Regards,

Phani

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi

Go Ahead with UDF , which will give you the better and exact result

former_member200962
Active Contributor
0 Kudos

Hi,

Check my answer in this thread...exactly same problem solved:)

i think i answered to your Q itself in the above thread.....wasn't that issue solved??

Regards,

Abhishek.

Edited by: abhishek salvi on Apr 13, 2009 7:15 PM

praveenreddy_bk
Participant
0 Kudos

Issue is not solved , when processed date is mapped to substring it is giving error

The message is: Unparseable date: "2009-04-14"

former_member200962
Active Contributor
0 Kudos

hi,

You are bound to get this error if your source date format is not according to what mentioned in the DateTransform function of mapping.....you should not have a varying Date format in this case....make 100% sure that the date format is the same in the source message and in the Datetransform properties.

If you mention that source date is of format DDMMYYYYHH:MM:SS then it has to be in that format only....DDMMYYYY will give you error.

Regards,

Abhishek.

former_member518917
Participant
0 Kudos

Hi Praveen,.

You can achieve this using standard function.

For the first instance try like this :

Input-> substring (0..10) -> TransformDate ( GO in properties: Give source format as YYYY-MM-DD and target format as DDMMYY) -> Output

Here substring will take first 10 characters, that is characters that are coming before "T" , and then transfor it to desired format.

Br,

Ritu

Former Member
0 Kudos

You can simply achieve with Stand. DateTrans function. Just use Substring function before mapping to DateTrans function.. and substring first 10 char from source field.. e.g.

Source_Date ---> Substring (0..9) -> DateTrans(under properties set you desired pattern)-> Target_Date

Hint: Substring & concatenate the source field first then pass to DateTrans function...accordingly.

Former Member
0 Kudos

Hi,

If you use standard dataTrans function it will not work, but as Sarvesh said if use substring and then dateTrans then it will work.

Regards,

Phani

madanmohan_agrawal
Contributor
0 Kudos

Hi Praveen,

Praveen Says..

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

In both ways you can do it. but standard date function will be easier.

Use standard function ""TransformDate".

Go to properties --> In "Format of Source Date" click on question mark at right hand side --> then click on "Create Pattern". There you can define your own pattern.

Regards,

Madan Agrawal

JoelTrinidade
Active Contributor
0 Kudos

Hi Praveen,

I think you can achieve your requirement by the date transformation std functionality provided in graphical mapping.

Regards

joel