I'm trying to use this formula in a snippet table. It doesn't show an error but comes up with very wrong results. Any ideas?
{today={time: DD/MM/YY}} {=Datetimediff(Datetimeparse({=row.vacdue}, "YYYY-MM-DD"), Datetimeparse(today,"YYYY-MM-DD"), "D")}
I'm trying to use this formula in a snippet table. It doesn't show an error but comes up with very wrong results. Any ideas?
{today={time: DD/MM/YY}} {=Datetimediff(Datetimeparse({=row.vacdue}, "YYYY-MM-DD"), Datetimeparse(today,"YYYY-MM-DD"), "D")}
Hi @tonyd,
I think the first command should be {today={time: YYYY-MM-DD}} instead of {today={time: DD/MM/YY}} as you are parsing today using "YYYY-MM-DD" format. Let me know if it works for you.
Still getting wrong results
Caia 14 9.2 16/05/11 24/07/26 539
Luna 14 10.0 16/05/11 24/07/26 539
Passion 12 7.8 01/05/13 10/09/26 5591
Fleur 11 4.7 01/07/14 12/08/26 4891
539 should be 189
Try this, as row value format is "DD/MM/YY"
{today={time: DD/MM/YY}} {=Datetimediff(Datetimeparse({=row.vacdue}, "DD/MM/YY"), Datetimeparse(today,"DD/MM/YY"), "D")}
Great, that works. Thanks very much