Extract functions

Extract functions return individual field values (e.g., hour, minute, name of month, weekday name) from a variable of one of the timeseries data types. The extract functions are:

  • extract_dt
  • extract_i
  • extract_tm
  • extract_ts

Summary

These functions perform perform basic extraction of timeseries field values.

This table shows the valid values of string parameters you can extract with the extract_ functions:

Time UnitStringAvailable Extract Functions
Yearyearextract_ts, extract_dt
Monthmonextract_ts, extract_dt
Daydayextract_ts, extract_dt, extract_i
Hourhourextract_ts, extract_tm, extract_i
Minminextract_ts, extract_tm, extract_i
Secsecextract_ts, extract_tm, extract_i
Millisecondmsextract_ts, extract_tm, extract_i
Microsecondus (or mcs)extract_ts, extract_tm, extract_i
Julian dateydayextract_ts, extract_dt
Weekdaywdayextract_ts, extract_dt