Writing Expressions : Manipulating date-and-time data : Getting parts of a date or time as a number
 
Getting parts of a date or time as a number
You can use the JavaScript date functions, such as getDay( ), getMonth( ), and getYear( ), to get the day, month, or year of a specified date field. Similarly, using the getHours( ), getMinutes( ), and getSeconds( ) functions, you can get the hour, minute, or second of a specified time field.
All these functions return values as numbers. For example, getDay(row["orderDate"]) returns 1 for a date that falls on Monday. Except for getDate( ), which returns the day of the month, the range of return values for the other functions start at 0. The return values for getMonth( ), for example, are between 0, for January, and 11, for December. Similarly, getDay( ) returns 0 for Sunday and 6 for Saturday.
To display parts of a date in a different format, for example, display the month as a word such as January, February, and so on, use Property Editor to set the data element’s Format DateTime property to the desired format.