How to Convert a DTG Date String to Excel Date Format
Question details
The user needs to convert a military Date-Time Group (DTG) string format into a recognized Excel date and time format.

- Product
- Spreadsheet
- Device & OS
- not provided
- Scenario
- Working with imported data containing continuous DTG date formats (e.g., 281121zJAN22) that need to be parsed and displayed as standard spreadsheet dates.
- Observed behavior
- The data is formatted as a continuous alphanumeric string (DTG), which the spreadsheet software natively reads as plain text rather than a calculable date and time.
Ensure your DTG date strings follow a consistent character structure and length (e.g., DDHHMMzMONYY). If the character position varies, you may need to clean the data before applying the extraction formula.
Use a Formula to Extract and Convert DTG to Date
Combine the MID and TEXT functions to pull the individual day, month, year, hour, and minute components from the string and format them properly.
This method uses the MID function to extract specific chunks of text based on character positions and concatenates them with slashes and colons so the TEXT function can interpret it as a valid date.
Click the empty cell where you want the standard date to appear.
Assuming your DTG string is in cell A1, enter the following formula: =TEXT(MID(A1,1,2)&"/"&MID(A1,9,3)&"/"&MID(A1,13,2)&" "&MID(A1,3,2)&":"&MID(A1,5,2),"DD/MM/YY HH:MM")
Press Enter to apply the formula. The string will now display as a standard date and time format.
Click the small square at the bottom-right corner of the cell and drag it down to apply this formula to the rest of the DTG strings in your column.

Use Flash Fill for Quick Pattern Extraction
If you have a modern spreadsheet program, you can use Flash Fill to train the software to recognize the date extraction pattern automatically.
Convert Complex Date Strings Effortlessly in WPS Spreadsheet
WPS Spreadsheet provides powerful text functions, advanced Flash Fill, and flexible data formatting to help you clean and convert complex data strings like DTG dates in seconds.
- 1. Open WPS Spreadsheet: Launch WPS Office and open the workbook containing your DTG data.
- 2. Apply the Conversion Formula: Click an empty cell and paste the MID and TEXT combination formula to parse your DTG string perfectly.
- 3. Format the Cells: Right-click the newly converted cell, select Format Cells, and customize the Date or Time display to your exact preference.
- 4. Batch Process: Double-click the fill handle in the bottom right corner of your selected cell to convert thousands of rows instantly.

Frequently Asked Questions
What is a DTG format?
DTG stands for Date-Time Group, a format typically used in military and government communications. A string like 281121zJAN22 represents the 28th day, 11:21 Zulu time, in the month of January, year 2022.
Why doesn't my spreadsheet recognize DTG as a date natively?
Spreadsheet software recognizes dates based on standardized regional formats (like MM/DD/YYYY). A DTG combines days, hours, minutes, time zones, months, and years into a single continuous alphanumeric string without standard delimiters, which the software reads as plain text until parsed.
Can I convert the timezone component (e.g., 'z' for Zulu) to my local time?
Yes, but it requires an additional time conversion step. Once you extract the base time using the formula provided, you can add or subtract the appropriate time difference (e.g., + or - hours/24) to adjust the Zulu time to your local timezone.
Why is my converted date formula showing a #VALUE! error?
This typically occurs if the original DTG string does not have the exact number of expected characters, causing the MID function to extract the wrong parts of the string. Verify that your source data has a uniform character length without extra spaces.




