0 Replies Latest reply: Jan 31, 2012 12:38 PM by Josh Campbell RSS

    Date Format & Load Solution

    Josh Campbell

      Thought I would share the following...I was importing data with field called "Date" with this format "MM/DD/YYYY" but I needed to break out each of those elements (Month, Day, Year) for analysis purposes. And with a very simple addition to my load script it works great:

      MyData:

      LOAD Date,

      Year(date#([Date],'MM/DD/YYYY')) as Year,

      Month(date#([Date],'MM/DD/YYYY')) as Month,

      Day(date#([Date],'MM/DD/YYYY')) as Day,

      Description,

      Category,

      Labels,

      Notes

      FROM

      C:\somefile.txt

      (txt, codepage is 1252, embedded labels, delimiter is ',', msq);