Kexi/Plugins/Queries/SQL Constants: Difference between revisions

From KDE Community Wiki
< Kexi‎ | Plugins‎ | Queries
Line 32: Line 32:


Where {date} is defined as for Date literals and {time} is defined as for Time literals.
Where {date} is defined as for Date literals and {time} is defined as for Time literals.
Notes:
*All notes regarding date and time format also apply to data and time parts of the value

Revision as of 15:38, 15 April 2018

Date constants

(since 3.1.1, Bug #393094)

Grammar - two versions:

  • ISO format (KEXI default, recommended)
#yyyy-mm-dd#
  • US format (for compatibility, based on MSA default [1])
#mm/dd/yyyy#

Notes:

  • Both formats are not dependent on regional settings on the OS, they are always interpreted the same way
  • All digits are required, including trailing zeros and century; e.g. #2018-4-15# and #18-11-11# are both invalid dates
  • MSA's format such as #24 Dec 2014# is not supported.

Time constants

Grammar - two versions:

  • Full
#hh:nn:ss#
  • Short
#hh:nn#

Date/Time constants

(since 3.1.1, Bug #393094)

Grammar:

#{date} {time}#

Where {date} is defined as for Date literals and {time} is defined as for Time literals.

Notes:

  • All notes regarding date and time format also apply to data and time parts of the value