table Kunde, Status, Zahlungsziel, Bezahlt as "Bezahlt am:", Datei
FLATTEN regexreplace(Zahlungsziel, "^(\d{2})-(\d{2})-(\d{4})$", "$3-$2-$1") AS s_rDate
where date(s_rDate)=date(today)
in the following code I am shown today’s entry using the payment date column.
This works fine.
how can i show me the expired days/date
a > or < does not work
I do not understand it
why goes for example
where date(s_rDate)<date(today)
or
where date(s_rDate)>date(today)
not?
date(today)
looks for a date formatted in compliance with ISO 8601, doesn’t it? Would you need to remedy the date?
https://blacksmithgu.github.io/obsidian-dataview/reference/literals/#dates
1 Like
i don’t understand.
yes, the date is in the format DD-MM-YYYY, it is important to leave it like this.
unfortunately i don’t get a result with a greater or less query.
table Kunde, Status, Zahlungsziel, Bezahlt as "Bezahlt am:", Datei
FLATTEN regexreplace(Zahlungsziel, "^(\d{2})-(\d{2})-(\d{4})$", "$3-$2-$1") AS s_rDate
where date(s_rDate)<dateformat(date(today),"DD-MM-YYYY")
1 Like
Hi.
My understanding that date(today)
is looking for a date in ISO 8601 standard : YYYY-MM-DD
not DD-MM-YYYY
, so there is incompatibility between date(today)
and the DD-MM-YYYY
format you are using, isn’t there?
1 Like
yes, I kind of thought so too.
but i solved the problem .
in the code below it makes a comparison
from
WHERE date(s_rDate) <date(today)
date(s_rDate) is in the format DD-MM-YYYY
date(today) format???
but it works now…
I can view all elapsed times, today and all future dates using the payment due date column, which has been converted to DD-MM-YYYY
I don’t quite understand it now, why can it be displayed with
< and > date(today)?
maybe there is a pro here???
As I said, it goes now… but WHY??
table Kunde, Status, Zahlungsziel, Bezahlt as "Bezahlt am:", Datei
from "3 Rechnungen (erstellte Rechnungen)"
FLATTEN regexreplace(Zahlungsziel, "^(\d{2})-(\d{2})-(\d{4})$", "$3-$2-$1") AS s_rDate
WHERE date(s_rDate) <date(today) and contains(Status,"🔴")
SORT date(s_rDate) asc
1 Like
I have understood it now.
I think
date(s_rDate)
the variable date(today) is in the format (2023-09-08)
my variable date(s_rDate) has been converted from the format DD-MM-YYYY to the format YYYY-MM-DD.
so a normal greater than or less than or equal to query can take place.
I think this is the right way and my head is clear again
WHERE date(s_rDate) >date(today)
1 Like
Good to hear you have a solution.
1 Like
system
Closed
August 15, 2023, 9:42am
8
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.