Page tree

 

Support | BlogContact Us | 844.332.2821

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DEV and version r0411

This example illustrates how a variety of date-related functions can be used to derive specific values out of a column of Datetime type.

  • YEAR - Returns the four-digit year value from a Datetime value. See YEAR Function.
  • MONTH - Returns the two-digit month value from a Datetime value. See MONTH Function.
  • MONTHNAME - Returns the full month name value from a Datetime value. See MONTHNAME Function.
  • DAY - Returns the day of the month as a numeric value from a Datetime value. See DAY Function.
  • HOUR - Returns the hour value on a 24-hour scale from a Datetime value. See HOUR Function.
  • MINUTE - Returns the minutes value from a Datetime value. See MINUTE Function.
  • SECOND - Returns the seconds value from a Datetime value. See SECOND Function.

Source:

date
2/8/16 15:41
12/30/15 0:00
4/26/15 7:07

Transform:

D code

derive value: YEAR (date)

D code

derive value: MONTH (date)

D code

derive value: MONTHNAME (date)

D code

derive value: DAY (date)

D code

derive value: WEEKDAY (date)

D code

derive value: HOUR (date)

D code

derive value: MINUTE (date)

D code

derive value: SECOND (date)

 

...

Info

NOTE: If the source Datetime value does not contain a valid input for one of these functions, no value is returned. See the second_date column below.

dateyear_datemonth_datemonthname_dateday_date
weekday_date
hour_dateminute_datesecond_date
2/8/16 15:4120162February8
1
1541 
12/30/15 0:00201512December30
3
00 
4/26/15 7:0720154April2677
7