Skip to main content
Solved

AM PM to 24 Format

  • March 27, 2019
  • 2 replies
  • 101 views

jugoslaviaa
Enthusiast
Forum|alt.badge.img+6

Hi everyone,

I have attribute values like 7-10A, 6A-8P etc and I would like to convert them to 24 Hours format as in the following

  • 7-10A to 7-10
  • 6A-8P to 6-20
  • 10A-3P to 10-15

Any idea how i can do it? Many thanks

 

Best

Best answer by david_r

I would consider using an AttributeSplitter followed by the DateTimeConverter. You can then join the start and end times back together in the end, if needed.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

david_r
Celebrity
  • 8394 replies
  • Best Answer
  • March 27, 2019

I would consider using an AttributeSplitter followed by the DateTimeConverter. You can then join the start and end times back together in the end, if needed.


jugoslaviaa
Enthusiast
Forum|alt.badge.img+6
  • Author
  • Enthusiast
  • 89 replies
  • March 28, 2019

I would consider using an AttributeSplitter followed by the DateTimeConverter. You can then join the start and end times back together in the end, if needed.

DateTimeCoverter did not help or I could not figure out to use. I basically had to split by - and then try to convert to 24 i.e. Check if the sring is A, number stay as it is or if it is P, add 12 to the value