-1

I want to convert string

1516270217

to date format

hh:mm dd-MM-YY

Sakthi
  • 9
  • 1
  • 6
  • 1
    What format is the input in? Unix/Windows timestamp in decimal? If it's in the `hhmmddMMYY` format, just add separators... – John Dvorak Mar 13 '17 at 12:43
  • I want to convert the string "1516270217" to date format as mentioned above. – Sakthi Mar 13 '17 at 12:57
  • 1
    Possible duplicate of [Java string to date conversion](http://stackoverflow.com/questions/4216745/java-string-to-date-conversion) – Olaia Mar 13 '17 at 14:02
  • 1
    When you ask a question, you should include: 1) Any findings from when you tried to solve the problem yourself, including research and attempts. 2) A question about real code, not a question about how to implement something or where to start. 3) A very brief background of what you're trying to ultimately accomplish with this, to avoid an [XY Problem](https://meta.stackexchange.com/questions/66377/what-is-the-xy-problem). – 4castle Mar 14 '17 at 03:10

1 Answers1

3

You can do that in a tmap for example.

TalendDate.formatDate("hh:mm dd-MM-YY",TalendDate.parseDate("HHmmddMMyy",row21.newColumn))
RealHowTo
  • 34,977
  • 11
  • 70
  • 85
Théo Capdet
  • 1,042
  • 3
  • 18
  • 34