--- title: "get*" description: "Extracts a unit of time from a date" --- # get* > Extracts a unit of time from a date **This function is used by Ignition's Expression language.** ## Description This function is a set of functions that include: | Function | Description | |---|---| | getMillis | Extracts the milliseconds from a date, ranging from 0-999. | | getSecond | Extracts the second from a date, ranging from 0-59. | | getMinute | Extracts the minutes from a date, ranging from 0-59. | | getHour12 | Extracts the hour from a date. Uses a 12 hour clock, so noon and midnight are returned as 0. | | getHour24 | Extracts the hour from a date. Uses a 24 hour clock, so midnight is zero. | | getDayOfWeek | Extracts the day of the week from a date. Sunday is day 1, Saturday is day 7. | | getDayOfMonth | Extracts the day of the month from a date. The first day of the month is day 1. | | getDayOfYear | Extracts the day of the year from a date. The first day of the year is day 1. | | getMonth | Extracts the month from a date, where January is month 0. | | getQuarter | Extracts the quarter from a date, ranging from 1-4. | | getYear | Extracts the year from a date. | | getAMorPM | Returns a 0 if the time is before noon, and a 1 if the time is equal to or after noon. | ## Syntax `get*(date)` ### Parameters | Type | Parameter | Description | |------|-----------|--------------------------| | Date | `date` | The date to extract from.| ### Returns **Float** - The value of the specific unit of time extracted from the date. The unit is determined by the specific function used. ## Examples ```python title="Code Snippet" getMonth(now()) //This returns the current month. ``` ```python title="Code Snippet" getQuarter(getDate(2017, 3, 15)) //The date, April 15th, is in the second quarter, so this returns 2. ``` ```python title="Code Snippet" getDayOfWeek({Root Container.Calendar.date}) //Will return the day of the week of the selected date of the calendar component. ```