DateDiff



Returns the number of intervals between two date/time values (date2 minus date1). See DateAdd for the interval names.

Numeric DateDiff(String date1, String date2, String interval)

round-pushpin Returns 60.
SELECT DateDiff('2024-01-01', '2024-03-01', 'Day') as Days FROM Single

round-pushpin Returns the minutes between now and ten days ago.
SELECT Round(DateDiff(DateTimeUTC(), DateAdd(DateTimeUTC(), 'Day', -10), 'Minute')) as Minutes FROM Single




SQL :: IsNotLike
Returns true (1) if the text does not match the pattern. See Like for the wildcards.
SQL :: IsNull
Returns true (1) if the given value is null, otherwise false (0). This is how to test for missing fields and for the unmatched side of an outer join.
SQL :: IsNumeric
Returns true (1) if the given value is a number: digits with an optional leading sign and an optional decimal point. Null and empty values return 0.
SQL :: IsString
Returns true (1) if the given value cannot be converted to a number.
SQL :: LastIndexOf
Returns the zero-based position of the last occurrence of textToFind in textToSearch. Returns -1 when it is not found.
SQL :: Left
Returns the given number of characters from the start of the value.
SQL :: Length
Returns the number of characters in the given value.
SQL :: NullIf
Returns null when the conditional is true, otherwise returns the value.
SQL :: NullIfNumeric
Returns null when the conditional is true, otherwise returns the number.
SQL :: NullWhen
Returns null when the value equals compareToValue, otherwise returns the value.