Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi every body.
I'm importing data from an external MS ACCESS data source. In MS ACCESS table I have a field YEAR (format number).
By importing data into QV via script I need to convert this data into date format 1.12. & YEAR.
How can I do this ?
Thanx in advance
Sometimes I have found that you need the `YEAR` around the field names. Have you tried placing the grave accent (`) (shares same key as tilde~) around the field name?
date(makedate(year, month, day),'MM-DD-YYYY')
Thank you, Greg.
I tried
SQL SELECT .... date(makedate(YEAR,12,1),'DD.MM.YYYY') as MyDate ...
but no success 😞
Duski
Please try like:
Date#(1 &'.'& 12 &'.'& Date_Year,'DD.MM.YYYY')
Attached with an example.
Edit: BTW do this in the Preload script not in the SQL Select section.
Use the wizard when importing, instead of straight SQL...it's much easier to manage...
Load
<field>,
<field2>,
Year,
date(makedate(YEAR,12,1),'DD.MM.YYYY') as MyDate
...
from source
Thank you Ajay.
I tried
date#(1 &'.'& 12 &'.'& YEAR,'DD.MM.YYYY') - no success 😞
I tried
date#('1.12.'& YEAR,'DD.MM.YYYY') - no success too 😞
Duski
Ok.You can try the following
Still if it doesn't work:
Sometimes I have found that you need the `YEAR` around the field names. Have you tried placing the grave accent (`) (shares same key as tilde~) around the field name?
Thank you once more, Ajay,
inserting the formula into tle LOAD section helped 🙂
See you
Duski