79584275

Date: 2025-04-21 08:34:13
Score: 1
Natty:
Report link

I agree with Wernfried that you should not store your data/timestamps as a string, but with your source beeing a Hive table, maybe somebody else made this decision, at least try to store it as DATE (which actually is a timestamp) in ORACLE.

You can either achieve this in SQL as described above or use DataStage as the T of your ETL, for which your customer purchased it as I would guess.

In the Transformer stage

StringToTimestamp(YourInputColumn,'%mmm %dd %yyyy %H:%nn%aa')

Output of this in a Peek stage
STRING_COL:Jan 18 2019 1:54PM TS_COL:2019-01-18 13:54:00

The StringToTimestamp function (and the Date and Timeformats used by it) is well documented in DataStage.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Ralf Martin