cancel
Showing results for 
Search instead for 
Did you mean: 

Converting 7 digits number to date format

0 Kudos
575

Hi there,

If i have this number 1190130 (representing 20190130), how can I changed it to "01/30/2019".

Thanks.

View Entire Topic
ayman_salem
Active Contributor

First remove the first character from the number "1190319" (using Substr), then use "ToDate" to convert it to date, and finally format the date with "FormatDate" to the desired format.

...

(Suppose N is the variable that contains the number to be converted.)

N: ="1190130"

NN: =Substr([N];2;Length([N])-1)

n_Date: =FormatDate(ToDate([NN]; "yyMMdd"); "MM/dd/yyyy")

0 Kudos

Works perfect. Thanks a lot!