I am trying to convert time to 24H Time
I found a formula from @Bassam Khalil that had me create helper Columns for AM/PM, Hours, Minutes.
The first three formula's appeared to "work" but when I used the forth formula for helper column 24H it was #UNPARSEABLE (Formula used below). I changed "Time on Site" to my Column name.
=IFERROR(LEFT([Time On-Site]@row, 10) + " " + IF([AM PM]@row = "AM", Hours@row + ":" + Minute@row, VALUE(Hours@row) + 12 + ":" + Minute@row), "")
Not sure what I am doing wrong. If there is an easier way please let me know!
Answers
-
Have you thought about an additional column that is 24HR Time that is equal to the IF statement in your formula? Then you could just use the rest of your formula as IFERROR(LEFT([Time On-Site]@row, 10) + " " + [24HR Time]@row,""). Also I do not believe you need the VALUE in the IF formula it would just be the SUM(Hours@row + 12)
Michelle Choate
michelle.choate@outlook.com
Always happy to walk through any project you need help with!
-
@Michelle Choate 2 Thanks for the quick reply. When It comes to formula's in smartsheets I am a rookie to say the least.
I do have a helper Column that is for 24H.
=IFERROR(LEFT([Estimated Time of Return]@row, 10) + " " + IF([AM PM]@row = "AM", Hours@row +
":" + Minute@row, SUM(Hours@row + 12) + ":" + Minute@row), "")
This is the formula I used by taking the "Value" out and adding your SUM(Hours@row + 12).
Still getting an "error". I could have misunderstood you too. Like I mentioned I am a Formula rookie. haha -
What is the error? And yes, I suggested adding another column to put your entire IF statement into. Then your final output column would be the simple addition of two columns together.
Michelle Choate
michelle.choate@outlook.com
Always happy to walk through any project you need help with!
-
The other help I would suggest is breaking the formula into parts and seeing which part is throwing the error.
Michelle Choate
michelle.choate@outlook.com
Always happy to walk through any project you need help with!
-
@Michelle Choate 2 I either get unparsenable or the formula just appears in the column as text.
-
Want to jump on a call and troubleshoot? Email me at michelle.choate@outlook.com
Michelle Choate
michelle.choate@outlook.com
Always happy to walk through any project you need help with!
-
Thanks for the offer @Michelle Choate 2. I think I took another run at it with some different formula and it appears to be working (for now). Thanks for your help!
-
My pleasure @Dreim! Do you want to share what formula actually worked so people in the future searching this same question can have the answer?
Michelle Choate
michelle.choate@outlook.com
Always happy to walk through any project you need help with!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!