The easy way to convert date formats

When you get data from other systems (or other countries), you will invariably run into a problem with incompatible date formats. With Nextanalytics for Excel, you can easily adapt to any incoming date format without much effort — and no formulas!

When you load a file into Nextanalytics for Excel, your incoming columns are listed, showing how Excel will interpret them. If you have a date column, and it is not identified as a date, then it probably has an incompatible format. Simply drag the name of the date column from the Incoming box to the Rows box; the contents of the column will be shown in the worksheet in the background.

Switch to the Options tab, and in the Incoming Date Format box, match the characters appropriate for the dates you see in the worksheet. If you click on the Date Help button, a popup will appear with some of the codes possible, as well as a couple of web references you can use for more descriptions (see examples below).

Once you have entered the new format, click the Pivot tab to see how they are interpreted. You will see the column name in blue with a ‘(dates)’ tag, and since the most common report is a trend report, Nextanalytics for Excel will automatically pivot the dates across the columns for you.

To figure out what codes you need to enter, you first have to identify the various components of the dates you have been given, and then place the corresponding codes in the correct order. For example:

1/23/10  would be represented as  M/d/yy

5 JAN 10  would be  d MMM yy

2010-01-23  would be  yyyy-MM-dd

1997-07-16T19:20:30.45+01:00  would be  yyyy-MM-dd’T'HH:mm:ss.ffzzz

Date component How it appears Code to represent it
Year 0 to 99 Y
Year 00 to 99 yy
Year As a 4-digit number yyyy
Month 0 to 12 M
Month 00 to 12 MM
Month Abbreviated name (Jan, Feb, Mar, etc) MMM
Month Full name (January, February, etc) MMMM
Day 1 to 31 d
Day 01 to31 dd
Day Abbreviated day of the week (Mon, Tue, etc) ddd
Day Full name of day of week (Monday, Tuesday, etc) dddd
Hour 1 to 12 (12 hour clock) H
Hour 01 to 12 (12 hour clock) hh
Hour 0 to 23 (24 hour clock) H
Hour 00 to 23 (24 hour clock) HH
Minute 0 to 59 m
Minutes 00 to 59 mm
Seconds 0 to 59 S
Seconds 00 to 59 ss
AM/PM designator Single character t
AM/PM designator Two characters tt
Fractions of a second Always showing f to fffffff (match number of digits)
Fractions of a second Show only if non-zero F to FFFFFFF (match maximum number of digits)
Offset from UTC Hours with no leading zero z
Offset from UTC Hours with leading zero zz
Offset from UTC Hours and minutes zzz
Date separator   /
Time separator   :
Other text Surround with single or double quotes ‘  or  “

 Reference: http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx

, ,

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>