2 Replies Latest reply on Dec 30, 2015 1:31 AM by tkemmere

    Converting number to date

    tkemmere

      Dear all,

       

      I have a table that is to be filled (using a sritpt with Loop and Set field) automatically with a 19 records. The field "Year" is currently a a number field, and filled with 1996, 1997, 1998, 1999 ..... 2015. The next field "Begin of year" I would like to be filled with 01-01-1996, 01-01-1997 ... 01-01-2015, and I would like it to be a date-field. (In my country we use dd-mm-yyyy).

       

      There will also be a date field "End of year" with 31-12-1996, 31-21-1997 ...31-12-2015.

       

      What script step(s) could I use to 'convert' for example the number 1998 and set the other field with the date 01-01-1998?

       

      I'm thinking in the direction of Year times 365.242 but then, how do I make a number show as a date?

      Or maybe there is a completely other, better way to do it?

       

      Any suggestions would be very welcome! :-) Thank you.

       

      Regards, Thomas.