@@ -9,44 +9,48 @@ Changes a date, a time, or a date and time to a specified format.
99
1010Introduced: 1.0
1111
12- OS: mac, windows, linux, ios, android
12+ OS: mac, windows, linux, ios, android, html5
1313
1414Platforms: desktop, server, mobile
1515
1616Example:
17- convert "11/22/90" to long english date
17+ convert "11/22/2016" to long english date
18+ put it
1819
1920Example:
2021convert the internet date from internet date to system date
2122
2223Example:
24+ local lastChangedTime
25+ put the date && the long time into lastChangedTime
2326convert lastChangedTime to abbreviated time and long date
2427
2528Example:
2629convert the date && the time to seconds
30+ put it
2731
2832Parameters:
2933dateAndTime (string):
3034A string or container with a date, a time, or a date and time separated
3135by a space, tab, or return character.
3236
3337format:
34- One of the following (examples are February 17, 2000 at 10:13:21 PM, in
38+ One of the following (examples are February 17, 2017 at 10:13:21 PM, in
3539the Eastern time zone, using US date and time formats): If you specify
3640both a date and time format, they can be in either order and must be
3741separated by a space. The resulting date and time are in the order you
38- provided, separated by a space. If you specify seconds or dateItems, you
42+ provided, separated by a space. If you specify seconds or < dateItems> , you
3943can request only one format.
4044
41- - "short date": 2/17/00
42- - "abbreviated date": Thu, Feb 17, 2000
43- - "long date": Thursday, February 17, 2000
45+ - "short date": 2/17/17
46+ - "abbreviated date": Thu, Feb 17, 2017
47+ - "long date": Thursday, February 17, 2017
4448- "short time": 10:13 PM
4549- "abbreviated time": 10:13 PM
4650- "long time": 10:13:21 PM
47- - "internet date": Thu, 17 Feb 2000 22:13:21 -0500
51+ - "internet date": Thu, 17 Feb 2017 22:13:21 -0500
4852- "seconds": the number of seconds since the start of the epoch
49- - "dateItems": 2000 ,2,17,22,13,21,5
53+ - "dateItems": 2017 ,2,17,22,13,21,5
5054
5155
5256It:
@@ -55,18 +59,11 @@ placed in the <container>, replacing the previous contents. If the
5559<dateAndTime> is a <string>, the converted date and time is placed in
5660the <it> <variable>.
5761
58- The result:
59- For example, suppose you start with 9:30 AM , convert that time to
60- <dateItems> format, then add 45 minutes to item 5 (the minute) of the
61- resulting value. This gives you 75 as the minute. When you convert the
62- value to any other time format, the <convert> <command> automatically
63- converts "75 minutes" to "1 hour and 15 minutes" :.
64-
6562Description:
6663Use the <convert> <command> to change a date or time to a <format>
6764that's more convenient for calculation or display.
6865
69- The dateItems format is a comma-separated list of numbers:
66+ The < dateItems> format is a comma-separated list of numbers:
7067
7168* the year
7269* the month number
@@ -78,12 +75,18 @@ The dateItems format is a comma-separated list of numbers:
7875 and so forth
7976
8077
81- The <convert> <command> can handle dates in dateItems format where one
78+ The <convert> <command> can handle dates in < dateItems> format where one
8279or more of the items is out of the normal range. This means you can add
83- arbitrary numbers to an item in the dateItems and let the <convert>
80+ arbitrary numbers to an item in the < dateItems> and let the <convert>
8481<command> handle the calculations that span minute, hour, day, month,
8582and year boundaries.
8683
84+ For example, suppose you start with 9:30 AM, convert that time to
85+ <dateItems> format, then add 45 minutes to item 5 (the minute) of the
86+ resulting value. This gives you 75 as the minute. When you convert the
87+ value to any other time format, the <convert> <command> automatically
88+ converts "75 minutes" to "1 hour and 15 minutes" :
89+
8790 convert "9:30 AM" to dateItems
8891 add 45 to item 5 of it
8992 convert it to time -- yields "10:15 AM"
@@ -95,7 +98,7 @@ is true, or if you use the <system> keyword, the user's current system
9598preferences are used to format the date or time. Otherwise, the standard
9699US date and time formats are used.
97100
98- The internet date, seconds, and dateItems formats are invariant and do
101+ The internet date, seconds, and < dateItems> formats are invariant and do
99102not change according to the user's preferences.
100103
101104>*Note:* The <convert> command assumes all dates / times are in local
@@ -108,9 +111,9 @@ not change according to the user's preferences.
108111> limited by the operating system's date routines. In particular,
109112> Windows systems are limited to dates after 1/1/1970.
110113
111- References: sort container (command), convert (command), time (function),
114+ References: sort container (command), time (function),
112115dateFormat (function), milliseconds (function), date (function),
113- format (function ), keyword (glossary), variable (glossary),
116+ format (glossary ), keyword (glossary), variable (glossary),
114117command (glossary), container (glossary), dateItems (keyword),
115118system (keyword), long (keyword), short (keyword), string (keyword),
116119seconds (keyword), abbreviated (keyword), internet (keyword),
@@ -119,4 +122,3 @@ useSystemDate (property), centuryCutoff (property),
119122twelveHourTime (property)
120123
121124Tags: math
122-
0 commit comments