Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: time conversion from 12 hr to 24 hour

  1. #1
    Join Date
    Sep 2017
    Posts
    27

    Question time conversion from 12 hr to 24 hour

    I'm having an issue in converting 12 hour to 24 hour time (military time).

    I'm using the Text Input file. The raw data is showing like these samples - 12:10P, 6:59P, 10:04A, 2:10P

    What do i need to do so that the end result would look like this 12:10, 18:59, 10:04 and 14:10?

    Thank you,

    Claudia

  2. #2
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    In your Text Input, use a format along the lines of hh:mma
    Then pass it through a Select Values step to change the format to HH:mm

    Source:
    https://docs.oracle.com/javase/8/doc...ateFormat.html

    But... I would still ask... What's the point? It's just a format.

  3. #3
    Join Date
    Sep 2017
    Posts
    27

    Default

    I was thinking that if I want the time written to Oracle database in the near future, I would need to learn how to convert the 12 hour value to military time? Or would the database accept values like this - 2:10P ?

    Thanks,

  4. #4
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    As long as PDI understands it to be a date, it will pass it to Oracle in a way Oracle will understand.

  5. #5
    Join Date
    Sep 2017
    Posts
    27

    Default

    Okay. Thank you.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.