Thread DATEDIFF (9 answers)
Opened by Kuerbis at 2025-01-27 08:37

GwenDragon
 2025-01-27 11:57
#196839 #196839
User since
2005-01-17
14787 Artikel
Admin1
[Homepage]
user image
https://mariadb.com/kb/en/datediff/ besagt:
Quote
DATEDIFF() returns (expr1 – expr2) expressed as a value in days from one date to the other. expr1 and expr2 are date or date-and-time expressions. Only the date parts of the values are used in the calculation.


Mindestwert bei deinem Beispiel is 1, weil die Differenz in Tagen gilt.

Wann so eine solche Funktion sinnvoll ist?
Vielleicht, wenn eine:r mit SQL prüfen will ob etwas schon XX Tage her ist.
https://www.geeksforgeeks.org/mariadb-datediff-fun...
Last edited: 2025-01-27 12:04:44 +0100 (CET)

View full thread DATEDIFF