Function | Parameters | Return Value | Description |
---|
convert_date_to_planta_time(date, date_format=%d.%m.%Y) | date: String containing a date
date_format: A valid date format string | The date converted to amount of days since 01.01.1970 | Converts a readable date into the format used by PLANTA date fields |
convert_planta_time_to_date(planta_time, date_format=%d.%m.%Y) | planta_time: Days since 01.01.1970
date_format: A valid date format string | A readable date as defined by the format | Converts the PLANTA internal date format to a readable string |
get_sql_date_format(planta_time) | planta_time: Days since 01.01.1970 | Returns a string to be used in an sql statement | Converts the days since 01.01.1970 to a proper date string and then adds the dbms related code to make it valid sql |
sanitize_value(value) | value: A value you want to insert into a SQL statement | A sanitized version of the value | Sanitizes a string that will later be formatted into an sql statement. Useful for preventing SQL injections or putting UUID objects into a statement |