Fandom

Livecode Wiki

Date

1,968pages on
this wiki
Add New Page
Comments0 Share

Returns the current date.

Syntax:

date()
the [{ long | abbr[ev[iated]] | short }] [{ english | system | internet }] date

Examples:

answer the date
put the internet date into dateHeader
put the long system date into field "Today's Date"

Use the date function to display the current date to the user, or to store the date for later use.

The format of the system date forms is set by the Date & Time control panel (on Mac OS systems), the Date control panel (on Windows systems), or the LANG environment variable (on Unix systems).


If the useSystemDate property is set to true or if you specify the system date, the times returned by the date function are formatted according to the user's system preferences. The english, means as useSystemdate set to false.

Here is the options:

  • none: 09/04/2017
  • short: 09/04/2017
  • long: "Sunday, 6th April, 2017"
  • abbreviated: "Sun, 6 Apr, 2017"
  • internet: "Sun, 9 Apr 2017 11:50:00 +0200"


Changes: The ability to use the date format preferred by the user was introduced in version 1.1. In previous versions, the date function, along with the time function, consistently used the standard U.S. format, even if the operating system's settings specified another language or date format.

See also: dateFormat (function), milliseconds (function), format (function), ticks (function), centuryCutoff (property),

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.