Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have the following code to generate dates:
Date:
LOAD
today()-recno()+1 as Date
autogenerate(today()-'2011-01-01');
DateParts:
LOAD
Date as Date,
Year(Date) as Year,
Month(Date) as Month,
MonthName(Date) as monthYear
RESIDENT Date;
Drop table Date;
However the dates I'm pulling in from my db to the QV script comes in the following format 'DD/MM/YYYY'
This is causing a conflict in my data, and my Month and Year listboxes are not linking with this date from my db.
I've tried to change the date format with the following code:
date#(date(date,'YYYY-MM-DD')) as event_date
Is there anything else I can do?
Thanks
Try this Date() or Date#() functions.
Hi - try this for the first load:
Date:
LOAD
Date(today()-recno()+1, 'YYYY-MM-D') as Date
Autogenerate(today()-Date#('2011-01-01', 'YYYY-MM-DD');
Is YYYY-MM-DD the default date format on your system?
Regards
Jonathan
The date format I'm pulling into QV from my system is 'DD/MM/YYYY'
Thanks
At load time write the script as follows:
load *,
DateField,
num(DateField) as DateField_NUM,
Date(DateField,'YYYY-MM-DD') as NewDateField;
Select * from TableName;
or anyways the formate of date will not affect the linking because it depends on the julien date.
Regards,
Nilesh Gangurde
I used this, thanks for the help...
Date:
LOAD
Date(today()-recno()+1, 'DD/MM/YYYY') as Date
Autogenerate(today()-Date#('10/04/2012', 'DD/MM/YYYY'));