Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, I would like to calculate from a date variable "vDateDébut" the smallest date
like this
i tried two formula but it doesn't work
min({<Date={"<$(=vDateDébut)"}> Date)
min({<Date={"<$(vDateDébut)"}> Date)
thank you for your help
Hi, I have an example
The expresion is like this: =date(min({<Date={"<$(=vDateDébut)"}>}Date), 'DD/MM/YYYY')
And I changed your variable to date format
And it works
P.S. QV is Case Sensitive, be careful with the field names, your field is named "Date" not "date"
thanks
i don't understand when I choose another time it does not work anymore
regards
I show two mistakes in your file, the name of the field (is Date) and the format of the variable, is necessary that field and variable have the same format. I changed the format of the variable.
I think, the best way is create a new field with the date in numeric format
LOAD
*,
floor(Date) as DateNum
Resident Yourtable
And use this field in the expression
I tried with datenum but it's no good
thanks
Could you send me the *.qvw? I can't reload to try it.
here
thanks
I can't do anything, is saved without data
Can you reload your Qvw file again using below changes in the Script. Never use a field name with QV native functions like Date.
LOAD *,
Date(Datenum, 'DD/MM/YYYY') AS DateField;
LOAD
Date AS OriginalDate,
Num(floor(Date)) AS Datenum,
[Code Client],
[Ca Produit HT]
FROM
(txt, codepage is 932, embedded labels, delimiter is ';', msq);
Hello,
You were right this was the date format thank you very much
Aggr(date(min({<Date={">$(=vDate24mois)"}>}Date
date(AddMonths(vDateDébut,-24),'DD/MM/YYYY')
thanks for your help