
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Converting DATE to String and String to Integer in TMAP
Hi All,
I have a small requirement, where multiple conversion is required
Scenario
I have date field name X_DT and it's Datatype is DATE and on the other end it has NUMBER Datatype. So how to convert it ?
First conversion should be on STRING Datatype and then it should converted into INTEGER Datatype.
Kindly assist.
Regards,
Rohitash Sherigar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Integer.valueOf(TalendDate.formatDate("yyyyMMdd", row1.datecolumn))

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Abhishek for the assistant.
It's worked out really.
Could you please share the link of this function to write.Where I can reference it or future.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Abhishek,
I'm getting an java error. Please assist.
Please find attachment in the post.
Kindly reply.
Regards,
Rohitash
ERROR_LOG.PNG

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Abhishek,
As discussed my date format is in this form
DATE FORMAT : "yyyyMMddHHmmssSSS"
First i have to convert into string and then into number format.
So please suggest which datatype is suitable?
Float,Double, Integer or BigDecimal.
Please share the expression.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try Long
Long.valueOf(TalendDate.formatDate("yyyyMMddHHmmssSSS", new Date()))
If you want BigDecimal ,
new BigDecimal(TalendDate.formatDate("yyyyMMddHHmmssSSS", new Date()))
