3 Replies Latest reply: Oct 30, 2013 6:39 AM by Jonathan Dienst RSS

    Time stamp

      Hi all,

       

      How to convert below date into date, year, month, time of the day sale occurs:

       

      2013-06-14 16:42:42 +1000

       

      BR,

      SAK

        • Re: Time stamp

          Month( Date#( YOURDATEFIELD,'MMM') ) as Month

          Year( Date#( YOURDATEFIELD,'YYYY') ) as Year

          Day( Date#( YOURDATEFIELD,'DD') ) as Day

           

          or like this:

           

          Date( Floor( Timestamp#( '2013-06-14 16:42:42', 'YYYY-MM-DD hh:mm:ss')), 'M/D/YYYY') as CreatedDate

          Date( Floor( Timestamp#( '2013-06-14 16:42:42', 'YYYY-MM-DD hh:mm:ss')), 'YYYY') as Year

          Date( Floor( Timestamp#( '2013-06-14 16:42:42', 'YYYY-MM-DD hh:mm:ss')), 'MMM') as Month

           

          and so on

          • Re: Time stamp
            Jonathan Dienst

            Hi

             

            Try this in your load statement:

             

            Date(Date#(SubField(DateField, ' ', 1), 'YYYY-MM-DD')) As DaleDate,

            Year(Date#(SubField(DateField, ' ', 1), 'YYYY-MM-DD')) As Year,

            Month(Date#(SubField(DateField, ' ', 1), 'YYYY-MM-DD')) As Month,

            Day(Date#(SubField(DateField, ' ', 1), 'YYYY-MM-DD')) As Day,

            Time(Time#(SubField(DateField, ' ', 2), 'HH:MM:SS')) As Time

             

            Regards

            Jonathan