Generates SQL code for selecting different parts of the timestamp
hsSqlExTsFields(tsField, extraTsFields = 0:11)
tsField | name of the table field containing the timestamp |
---|---|
extraTsFields | vector of integers representing different types of
time-stamp information: |
Returns SQL code for selecting different types of information on the time stamp.
#> [1] "Year(myTimestamp) AS myTimestamp_year, Month(myTimestamp) AS myTimestamp_month, Day(myTimestamp) AS myTimestamp_day, Hour(myTimestamp) AS myTimestamp_h, Minute(myTimestamp) AS myTimestamp_m, Second(myTimestamp) AS myTimestamp_s"## Output (re-formatted): # "Year(myTimestamp) AS myTimestamp_year, # Month(myTimestamp) AS myTimestamp_month, # Day(myTimestamp) AS myTimestamp_day, # Hour(myTimestamp) AS myTimestamp_h, # Minute(myTimestamp) AS myTimestamp_m, # Second(myTimestamp) AS myTimestamp_s"