|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ICT-Hotlist TopicHow to convert US standard time format to 24 hours (military) format using Excel 2013Getting those logfiles in an US standard time format using the PM/AM notation and have to present the data correctly sorted? Just convert them using these easy steps in Microsoft Excel 2013. You may also watch the step by step animation.Step 1Load your log or text file in Excel using a separator that separates the time from the AM/PM bit. Normally this will be a space character.
2014-07-05 1:25:59 PM "High level sensor 3" Alert
Example log-file using US-Time format. (Notice columns are not aligned.)
2014-07-05 1:51:23 PM "Normal level sensor 3" Informational 2014-07-05 10:04:46 AM "Switch 7 open" Warning 2014-07-05 10:19:11 AM "Switch 7 closed" Warning Step2After importing the log file with the import wizzard, your sheet should resemble:
Step 3Inserting a blank column gives:
=IF(UPPER(C1)="PM";B1+"12:00:00";B1)
Now propagate the formula in the column D*
Step 4Now you have the following in your Excel sheet:
Step 5Next format Cells in column D as "Time" of "Type" "*13:30:55" This results in:
Example animationReload the page to restart the animation.Animation on how to convert US-Time format to ISO-Time format using Microsoft Office Excel 2013. Download the example file here.
You may vote your opinion about this article:
Scripts and programming examples disclaimerUnless stated otherwise, the script sources and programming examples provided are copyrighted freeware. You may modify them, as long as a reference to the original code and hyperlink to the source page is included in the modified code and documentation. However, it is not allowed to publish (copies of) scripts and programming examples on your own site, blog, vlog, or distribute them on paper or any other medium, without prior written consent.Many of the techniques used in these scripts, including but not limited to modifying the registry or system files and settings, impose a risk of rendering the Operating System inoperable and loss of data. Make sure you have verified full backups and the associated restore software available before running any script or programming example. Use these scripts and programming examples entirely at your own risk. All liability claims against the author in relation to material or non-material losses caused by the use, misuse or non-use of the information provided, or the use of incorrect or incomplete information, are excluded. All content is subject to change and provided without obligation. |