Hello.
Using a “onChange” event of a drop down {active} i’m trying to store the Date and Time in mySQL table but it only seems to take the date?
The field in SC is set to Date-Time and so is the field in mySQL table.
This code is setting the fields in SC but the field wont show the time only the date (ex. 2014-09-19 00:00:00) ?
When i do a quick echo of {date_activated} I get the right response (2014-09-19 16:39:17) but it won’t update the field in SC or the database?
Any help is appreciated.
if ({active} == “1”)
{
{date_activated} = date(“Y-m-d H:i:s”); //Activated Date
{date_deactivated} = “”;
}
elseif ({active} == “0”)
{
{date_deactivated} = date(“Y-m-d H:i:s”);
}
else
{
//Do nothing
}