Difference between revisions of "Date and Time Values"

Line 1: Line 1:
 
[[Category:Analytica User Guide]]
 
[[Category:Analytica User Guide]]
<languages />
+
<breadcrumbs>Analytica User Guide > Using Expressions > {{PAGENAME}}</breadcrumbs>
<translate>
+
 
[[Analytica User Guide]] > [[Using Expressions]] > [[Date and Time Values]]
 
  
 
Dates and times are treated as numeric quantities, denoting the number of days elapsed since the date origin (usually 1-Jan-1904, or 1-Jan-1900 if the ''Use Excel date origin ''preference is checked). Dates can be entered directly into an expression, at any point in an expression and regardless of the number format setting, using the syntax ''d-MMM-yyyy'', such as <code>27-Jan-2010</code>, using a 3-letter English-language month abbreviation. Times can be entered in the format ''hh:mm:ss [tt]'', such as <code>10:27:00pm</code> or <code>22:27:00</code>, which becomes a fractional value between 0 and 1. A combined date-time can be entered as, e.g., <code>27-Jan-2010 10:27:00pm</code>. In the general case, you cannot enter other date formats within an expression. For example, <code>1/27/2010</code> would be interpreted as two divide operators, <code>(1/27)/2010</code>, and regional (non-English) month names, e.g., <code>27-Ene-2010</code>, are not recognized.
 
Dates and times are treated as numeric quantities, denoting the number of days elapsed since the date origin (usually 1-Jan-1904, or 1-Jan-1900 if the ''Use Excel date origin ''preference is checked). Dates can be entered directly into an expression, at any point in an expression and regardless of the number format setting, using the syntax ''d-MMM-yyyy'', such as <code>27-Jan-2010</code>, using a 3-letter English-language month abbreviation. Times can be entered in the format ''hh:mm:ss [tt]'', such as <code>10:27:00pm</code> or <code>22:27:00</code>, which becomes a fractional value between 0 and 1. A combined date-time can be entered as, e.g., <code>27-Jan-2010 10:27:00pm</code>. In the general case, you cannot enter other date formats within an expression. For example, <code>1/27/2010</code> would be interpreted as two divide operators, <code>(1/27)/2010</code>, and regional (non-English) month names, e.g., <code>27-Ene-2010</code>, are not recognized.
Line 9: Line 8:
  
 
==See Also==
 
==See Also==
{| style="margin: 1em auto 1em auto;width: 100%;border:0;table-layout: fixed;" cellpadding=5
+
<footer>Numbers / {{PAGENAME}} / Boolean or truth values</footer>
|- style="text-align: center"
 
| [[Numbers]] <- || [[Date and Time Values]] || -> [[Boolean or truth values]]
 
|}
 
</translate>
 

Revision as of 00:01, 5 November 2015


Dates and times are treated as numeric quantities, denoting the number of days elapsed since the date origin (usually 1-Jan-1904, or 1-Jan-1900 if the Use Excel date origin preference is checked). Dates can be entered directly into an expression, at any point in an expression and regardless of the number format setting, using the syntax d-MMM-yyyy, such as 27-Jan-2010, using a 3-letter English-language month abbreviation. Times can be entered in the format hh:mm:ss [tt], such as 10:27:00pm or 22:27:00, which becomes a fractional value between 0 and 1. A combined date-time can be entered as, e.g., 27-Jan-2010 10:27:00pm. In the general case, you cannot enter other date formats within an expression. For example, 1/27/2010 would be interpreted as two divide operators, (1/27)/2010, and regional (non-English) month names, e.g., 27-Ene-2010, are not recognized.

You can enter dates and times in more general formats, and in region/culture-specific styles, when the number format is set to Date and the date, time or date-time is the only element appearing in the expression. In this case, Analytica recognizes almost all commonly used formats, such as 27-January-2010, 1/27/2010, 1-27-2010, or Jan 27, 2010. When you enter a date in a format such as 1/2/2010 or 1-2-2010, the date is interpreted based on your regional setting. For example, in the US, these would parse to 2-Jan-2010, while in Europe they would generally parse as 1-Feb-2010. Non-English month names are also recognized in languages that use characters only from the standard Analytica character page (which includes most western European languages). For example, 27-Enero-2010 is recognized if you are in Spain.

See Also

Comments


You are not allowed to post comments.