
1. Re: How to convert 3 digit number (military time) to general time?
Nitin Paighowal Sep 1, 2018 7:25 PM (in response to Skye Noh)3 of 3 people found this helpfulPlease use this method
And format Date to hh:nn
PLEASE MARK IT AS CORRECT ANSWER IF IT SOLVES YOUR QUESTION

2. Re: How to convert 3 digit number (military time) to general time?
Shinichiro Murakami Sep 1, 2018 8:04 PM (in response to Nitin Paighowal)
timeformat_SM_10.5.twbx 5.4 KB


3. Re: How to convert 3 digit number (military time) to general time?
suman kumar Sep 1, 2018 10:02 PM (in response to Skye Noh)3 of 3 people found this helpfulHi Skye Noh
First add zero before your military number to make it 4 digit, Because military number contains 4 digit.
then here is explanation:
Question
How to convert a military time into a standard 12hour format.
Environment
 Tableau Desktop
Answer
To convert a 24hour integerbased time format, that may contain either three values such as 735 or four values such as 1348, follow the steps outlined below.
Step 1
First, separate the hours from the minutes while ensuring that we do not add extra values due to the different lengths possible for the integer value.
 Create the following calculation titled ‘Scheduled Trimmed Mil Hour’ in the example using the following formula.
IF
LEN(STR([Scheduled Departure Time])) = 4 THEN LEFT(STR([Scheduled Departure Time]),2)
ELSEIF
LEN(STR([Scheduled Departure Time])) = 3 THEN LEFT(STR([Scheduled Departure Time]),1)END
Step 2
Now we need to separate the minutes from the hours.
 Create the following calculation titled ‘Scheduled Minutes’ in the example using the following formula.
RIGHT(STR([Scheduled Departure Time]),2)
Step 3
Next we need to determine if the time is AM or PM.
 Create the following calculation titled ‘Scheduled AM/PM’ in the example using the following formula:
IF INT([Scheduled Trimmed Mil Hour]) > 12 THEN 'PM' ELSE 'AM'
END
Step 4
Now we need to incorporate all these values into one single field.
 Create the following calculation titled ‘Scheduled Standard Time’ in the example using the following formula.
STR([Scheduled Standard Hour])+':'+[Scheduled Minutes]+ ' ' + [Scheduled AM/PM]
Step 5
Lastly we need to have the new field recognized as an actual time field by Tableau Desktop.
 Create the following calculation titled ‘Scheduled Time Date Parsed’ in the example using the following formula.
DATEPARSE('hh:mm a', [Scheduled Standard Time])
How to Change Military Time Into Standard 12Hour Time Format  Tableau Software
Please mark correct and helpful if it works for you.
Best
Suman

4. Re: How to convert 3 digit number (military time) to general time?
Skye Noh Sep 2, 2018 8:12 PM (in response to Nitin Paighowal)Hi Nitin Paighowal,
Thank you a lot for your kind explanation and help : )
Kind Regards,
YS

5. Re: How to convert 3 digit number (military time) to general time?
Skye Noh Sep 2, 2018 8:14 PM (in response to Shinichiro Murakami)Dear Shinichiro Murakami San,
とてもありがとうございます : )
Kind Regards,
YS

6. Re: How to convert 3 digit number (military time) to general time?
Nitin Paighowal Sep 2, 2018 8:14 PM (in response to Skye Noh)Thanks Skye, if that helped answering your query , please mark it as correct answer for your scenario.

7. Re: How to convert 3 digit number (military time) to general time?
Skye Noh Sep 2, 2018 8:16 PM (in response to suman kumar)Hi Suman Kumar,
Thank you for your kind help : )
Kind Regards,
YS

8. Re: How to convert 3 digit number (military time) to general time?
Shinichiro Murakami Sep 2, 2018 8:27 PM (in response to Skye Noh)You are very welcome.
どういたしまして。
Shin