View source: R/sql_expressions.R
hsSqlExTsFields | R Documentation |
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.
hsGetTimeSeries
hsSqlExTsFields("myTimestamp", c(6:11))
## 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"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.