Convert date in timestamp

Convert a date from a datepicker to a timestamp for database storage.

Overview

The user needed to save a date from a form datepicker as a Unix timestamp in a database.
Use the strtotime function in a custom CF action or apply the specific CF syntax to convert the date value.

Answered
Connectivity v6
we webcrea 02 Jun, 2020
Hi,
​
Do you know how to convert date (from datepicker) in timestamp?
​
thanks
Chris
Max_admin Max_admin 02 Jun, 2020
to display it or save it as a timestamp ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
we webcrea 02 Jun, 2020
Hello Max,
​
to save it in db.
I made a function with strtotime and it's all right.
Maybe there is a specific syntax...?
​
thanks
Chris
Max_admin Max_admin 03 Jun, 2020
a strtotime solution should be ok!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.