Show/Hide Toolbars

XSharp

Date literals are formatted

 

 YYYY.MM.DD

 

 

or alternatively

       {^YYYY-MM-DD}

 

DateTime Literals can be constructed with the followin syntax

 {^YYYY-MM-DD HH:MM:SS}.

 

Examples:

  2000.01.01
  2012.02.29
  2015.09.25
  // foxpro date and datetime literals
  {^2019.02.28}
  {^2020.02.29 23:59:59}

Date and DateTime literals are supported in all dialects. In the Core dialect both date and datetime literals will be translated to a DateTime value. In the other dialects the Date literals are translated to a Date value.

Of course you can also use runtime functions to construct a literal, such as STOD("20150925") or ConDate(2019,9,25) but a literal is more efficient.