qc_as_timestamp: Convert known bad formats to correct TIMESTAMP format and set...

Description Usage Arguments Details Value Timezone See Also


Converting known bad TIMESTAMP formats to POSIXt and setting the correct timezone


qc_as_timestamp(data, env_md, parent_logger = "test")



Data frame containing TIMESTAMP variable. Also it can be a vector with TIMESTAMP values


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.

See Also

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

sapfluxnet/sapfluxnetQC1 documentation built on May 29, 2019, 1:50 p.m.