5 Replies Latest reply: Dec 1, 2011 10:02 AM by Susan Levin RSS

    Changing a timestamp to a date on the load script

      Hi,

       

      I have two tables, changes and SprintCalendar.  Changes has ScheduledStartDate which is a full date/timestamp format.  SprintCalendar has SprintDate which is just the date.  If it were a timestamp, it would be for example, 11/30/2011 00:00:00       To link the fields, I need to convert the Changes.start_date to just the date, as in convertng 11/30/2011 16:30:30 to 11/30/2011 00:00:00.

       

      I have tried DayName, Date#, DayStart, DayEnd, Day, Integer... You name it.  Mostly I get an "Unsupported scalar function:day." error

       

      My script is this: 

       

       

      SQL SELECT

           start_date as ScheduledStartDate,

           DayStart(start_date) as SprintDate < --  This is where it blows up.  Some functions work, but not the one I want.

      FROM changes;

       

      // sprint calendar through 2013

      LOAD SPRINTDATE  as SprintDate,

           SPRINTDAYNAME,

           SPRINTWEEK,

           SPRINTCODE

      FROM

      C:\QV_data\SprintCalendar.xlsx;

       

      Help please - what can I try?  I have searched the webs for any combination of QV, [source system], date, convert, etc. 

       

      Thanks...