Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have to reload script as below:
Table:
LOAD ID,
FinancialYr,
SQL SELECT *
FROM company
WHERE Datecreated>'03/12/2012';
I am getting error as Date format mismatch when loading this
pleasecan anyone help me how to change this.
thanks.
Define your date format as needed with the date syntax:
Date('Your field', 'DD/MM/YYYY')
Hi,
Thanks and it is showing below error when I am using this please help
Wrong number of arguments used with function in query expression 'Date(DateLogged,'DD/MM/YYYY')>'03/07/2013'.
Maybe a datetime format?
If DateLogged is datetime you can add floor to the statement to loose the timepart:
Date(floor(DateLogged, 'DD/MM/YYYY') > '03/07/2013'
convert(varchar(30),getdate(),10) 10 denotes formats,change different value for 10 you will get your format
This link may help you convert your format.
If your DB is SQL Server, SQL SELECT * FROM company WHERE Datecreated>'03/12/2012'; should work
If your DB is Oracle, SQL SELECT * FROM company WHERE Datecreated>TO_DATE('03/12/2012','DD/MM/YYYY');
should work.
I would recommend using dates formatted as 'YYYY-MM-DD' when passing dates to SQL as this format does not have any confusion between Months & Days.
A date '03/01/2013' can be read as Jan 3rd 2013 or March 1st 2013 depending if your in Europe or USA.
Also check the DateFormat string on the first tab of your QlikView load script which shows the system date setting, but this may not match how SQL is configured!
Try
SQL SELECT *
FROM company
WHERE Datecreated > '2012-12-03' ;