This function is used by Ignition's Expression language.

Description

This function is a set of functions that include:

FunctionDescription
getMillisExtracts the milliseconds from a date, ranging from 0-999.
getSecondExtracts the second from a date, ranging from 0-59.
getMinuteExtracts the minutes from a date, ranging from 0-59.
getHour12Extracts the hour from a date. Uses a 12 hour clock, so noon and midnight are returned as 0.
getHour24Extracts the hour from a date. Uses a 24 hour clock, so midnight is zero.
getDayOfWeekExtracts the day of the week from a date. Sunday is day 1, Saturday is day 7.
getDayOfMonthExtracts the day of the month from a date. The first day of the month is day 1.
getDayOfYearExtracts the day of the year from a date. The first day of the year is day 1.
getMonthExtracts the month from a date, where January is month 0.
getQuarterExtracts the quarter from a date, ranging from 1-4.
getYearExtracts the year from a date.
getAMorPMReturns a 0 if the time is before noon, and a 1 if the time is equal to or after noon.
Syntax

get*(date)

  • Parameters

Date date - The date to extract from.

  • Results

Integer - The value of the units of the date specified. The units are determined by the function used.

Code Examples
Code Snippet
getMonth(now()) //This returns the current month.
Code Snippet
getQuarter(getDate(2017, 3, 15)) //The date, April 15th, is in the second quarter, so this returns 2.
Code Snippet
getDayOfWeek({Root Container.Calendar.date}) //Will return the day of the week of the selected date of the calendar component.
  • No labels