Description Usage Arguments Details Value Timezone See Also
Converting known bad TIMESTAMP formats to POSIXt and setting the correct timezone
1 | qc_as_timestamp(data, env_md, parent_logger = "test")
|
data |
Data frame containing TIMESTAMP variable. Also it can be a vector with TIMESTAMP values |
env_md |
Data frame containing the environmental metadata, in order to obtain the timezone information |
When loading data from csv files, depending on the office version and workflow to introduce TIMESTAMP and data, TIMESTAMP can result in the wrong format (lost of seconds, for example). This function checks for known formatting errors and try to fix them.
An object of the same type of input (data frame or vector) with the fixed values of TIMESTAMP. If TIMESTAMP is already in format, a message appears and none fix is made, returning data as entered. If TIMESTAMP can not be fixed, an error is raised.
This function also set the timezone attribute to the POSIXt TIMESTAMP.
It uses qc_get_timezone
and qc_set_timezone
functions internally to get the timezone from the env_time_zone
variable, transforming it to a compatible timezone name and set it as a
POSIXt attribute.
Other Data Loading Functions: dl_data_col_classes
,
dl_data
, dl_dec_char_detect
,
dl_get_si_code
, dl_metadata
,
dl_na_char_generator
,
remove_dupcols
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.