Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a problem with a time column in the excel sheet that I'm trying to import to QV. I would like to convert the following:
Svarstid |
11.06.2013 15:33:00:117 |
11.06.2013 15:43:11:320 |
12.06.2013 10:50:27:877 |
12.06.2013 17:29:30:343 |
to this format:
YYYY-MM-DD
What do I need to do?
Thanks,
Petra
SET DateFormat='YYYY-MM-DD';
Load date(date#(Svarstid,'DD.MM.YYYY hh:mm:ss[:fff]')) as New_Svarstid, Svarstid as NewDate Inline [
Svarstid
'11.06.2013 15:33:00:117'
'11.06.2013 15:43:11:320'
'12.06.2013 10:50:27:877'
'12.06.2013 17:29:30:343'
];
Hi try this in the script
Load
Svarstid,
Date(Date#(SubField(Svarstid,' ',-2),'DD.MM.YYYY'),'YYYY-MM-DD') As NewDate
from ......
Try this, it's the same as above, but I had made sure it worked so I thought I would add it anyway
you could also try
Or try the following:
Load date(Floor(date#(Svarstid,'DD.MM.YYYY hh:mm:ss[:fff]')),'YYYY-MM-DD') as New_Svarstid, Svarstid as NewDate Inline [
Svarstid
'11.06.2013 15:33:00:117'
'11.06.2013 15:43:11:320'
'12.06.2013 10:50:27:877'
'12.06.2013 17:29:30:343'
];