Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,I have 3 fields with Day, Month and Year and would like to get one Date field. Can somebody help me with that?
Later, I would like to use this field in criteria where I want to show only those records where the date is older than the current date. Any clues where I can find my solution?
Thanks
Try
MakeDate(YearField, MonthField, DayField) as DateField
to create a date field from your three fields.
Regarding your second question, where do you want to use this filter? In the script ( --> look into a WHERE clause) or within a chart (for example, expression could look like sum(if(DateField < today(), Amount)) )
Thanks. I dont know the answer, I have to study it little bit more. I want to show only records of invoices which are overdue and want also to add another field with number of overdue days. If I understand it correct, I have more options, how to do this.
We tried to create a date field from our three fields
MakeDate[[C068_RokSplatnosti],[C067_MesSplatnosti],[C066_DenSplatnosti]] as `DateField`
but we found a problem
Syntax error (missing operator) in query expression 'MakeDate[[C068_RokSplatnosti]'.
Do you have any advice ?
Hi
Use the following;
MakeDate([C068_RokSplatnosti],[C067_MesSplatnosti],[C066_DenSplatnosti]) as `DateField`
You were just using the wrong kind of brackets to define the Makedate.
Steve
try below , ( ) was missing
MakeDate([C068_RokSplatnosti],[C067_MesSplatnosti],[C066_DenSplatnosti]) as DateField
I tried that
MakeDate([C068_RokSplatnosti],[C067_MesSplatnosti],[C066_DenSplatnosti]) as `DateField`
but I found another problem
SQL##f - SqlState: 37000, ErrorCode: 4294964194, ErrorMsg: [Microsoft][ODBC Microsoft Access Driver] Undefined function 'MakeDate' in expression.
can you post your script here... not sure where you are using this funcion.
You need to use QV functions in the LOAD part, not the SQL part (which is just sent to the DB driver for parsing):
LOAD
MakeDate([C068_RokSplatnosti],[C067_MesSplatnosti],[C066_DenSplatnosti]) as DateField;
SQL SELECT
[C068_RokSplatnosti],
[C067_MesSplatnosti],
[C066_DenSplatnosti]
FROM ...;
or use an appropriate SQL function in the SQL part instead.
A:
Load
makedate(day field,month field,year field) as date;
sql select *
from database table name;
B:
Load
*
resident A where date > today();
drop A;