Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have two field, the first [delivery year]
(2015) and the second [month/day delivery] (313) as follow
delivery year | month/day delivery |
---|---|
2015 | 313 |
2015 | 314 |
2015 | 314 |
2015 | 316 |
How can I load in the script a complete date filed with the format 'DD/MM/YYYY'
Thank you
Best regards.
Andrea
Hi Andrea,
please see attached, can use the below to give you this
Date(Date#([delivery year] & If(len([month/day delivery])<4, 0 & [month/day delivery], [month/day delivery]),'YYYYMMDD'),'DD/MM/YYYY') As date
hope that helps
Joe
Hi,
Date(Your_Date_Field,'DD/MM/YYYY') as Date
Thanks,
AS
Try like below,
date(makedate([delivery year],left([month/day delivery],1),right([month/day delivery],2)),'DD/MM/YYYY') as date
Try like
MakeDate([delivery year], left([month/day delivery], 1), right([month/day delivery], 2)) as Date
Thank you All and thank you Harshal,
your expression works properly, but I have seen that the field [month/day delivery] could be also with 4 digits and not only 3,
eg. 03 november as 1103
03 march as 303
How can I manage this difference?
Thanks!!
Hi,
you need to create separate fields like below,
if(len([month/day delivery])>3,left([month/day delivery],2),left([month/day delivery],1)) as [Month_month/day delivery]
&
right([month/day delivery],2) as [Day_month/day delivery]
Then create,
New_TBL:
Load
date(makedate(YearField,[Month_month/day delivery],[Day_month/day delivery]),'DD/MM/YYYY') as Date
resident Old_Table;
Hi Andrea,
please see attached, can use the below to give you this
Date(Date#([delivery year] & If(len([month/day delivery])<4, 0 & [month/day delivery], [month/day delivery]),'YYYYMMDD'),'DD/MM/YYYY') As date
hope that helps
Joe
Thank you Joe!
no worries glad to help