Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Based on the following data
TestTemp:
load * Inline
[
TestDate
01/01/2010
];
load
Date(Date#(TestDate),'YYYYMMDD') as DateNum
Resident TestTemp;
drop table TestTemp;
I want the DateNum field to be numeric YYYYMMDD. At the moment, it mantains the date format, as if I export it to excel I see it like DD/MM/YYYY.
If I formt it as num I'm not seeing the YYYYMMDD integer but other value.
at worst you can use
TestTemp:
load * Inline
[
TestDate
01/01/2010
];
load
num(left(Date(TestDate,'YYYYMMDD'),4)&left(right(Date(TestDate,'YYYYMMDD'),4),2)&right(Date(TestDate,'YYYYMMDD'),2)) as DateNum
Resident TestTemp;
drop table TestTemp;
at worst you can use
TestTemp:
load * Inline
[
TestDate
01/01/2010
];
load
num(left(Date(TestDate,'YYYYMMDD'),4)&left(right(Date(TestDate,'YYYYMMDD'),4),2)&right(Date(TestDate,'YYYYMMDD'),2)) as DateNum
Resident TestTemp;
drop table TestTemp;