AnsweredAssumed Answered

Date conversion ... Amlost there. Just need leading zeros

Question asked by PaulWebb_1 on Feb 19, 2013
Latest reply on Feb 19, 2013 by PaulWebb_1

Title

Date conversion ... Amlost there. Just need leading zeros

Post

     I'm converting a locale neutral timestamp.

     I want to convert from 2013-01-19 17:23:39 to 01/19/2013 5:23:39 PM

     I 3/4 of the way there. The following converts the timestamp to 1/19/2013 5:23:39 PM. I just need to add leading zeros to the month and day. I've tried a few things with no luck. Any ideas?

     Let([
     adj =Substitute ( RMACreateDate ; "-" ; ¶ ) ;
     month = GetValue ( adj ; 2 ) ;
     day = Left ( GetValue ( adj ; 3 ) ; 2 ) ;
     year = GetValue ( adj ; 1 ) ;
     time = Right ( GetValue ( adj ; 3 ) ; 8 )
     ];
     Timestamp ( Date ( month ; day ; year ) ; time )
     )

      

     Thanks

Outcomes