Data Import & Export

How to Convert a DTG Date String to Excel Date Format

Huda QurayshiHuda Qurayshi Nov 3, 2026 869 views

Question details

The user needs to convert a military Date-Time Group (DTG) string format into a recognized Excel date and time format.

How to Convert a DTG Date String to Excel Date 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.
Before you start

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.

Solution 1Recommended

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.

1
Select Target Cell

Click the empty cell where you want the standard date to appear.

2
Enter the Formula

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")

3
Apply Formula

Press Enter to apply the formula. The string will now display as a standard date and time format.

4
Fill Down

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 a Formula to Extract and Convert DTG to Date
Format Adjustment: You can modify the "DD/MM/YY HH:MM" section of the formula to match your preferred regional date formatting, such as "MM/DD/YYYY HH:MM".
Process Complex Data Easily

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. 1. Open WPS Spreadsheet: Launch WPS Office and open the workbook containing your DTG data.
  2. 2. Apply the Conversion Formula: Click an empty cell and paste the MID and TEXT combination formula to parse your DTG string perfectly.
  3. 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. 4. Batch Process: Double-click the fill handle in the bottom right corner of your selected cell to convert thousands of rows instantly.
Fully compatible with Microsoft Excel formulas and functionsAdvanced Flash Fill for instant data extraction without codingLightweight, fast, and completely free to useBuilt-in tools for seamless data import and export workflows
microsoft office alternative - wps office

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.