Link to home
Start Free TrialLog in
Avatar of AccurateDesign
AccurateDesign

asked on

Convert Date to Unix Time Stamp

Hi,

I am trying to convert a date to a unix time stamp using the plugin Gravity Form and Sugar Events Calendar.


Using the code below, I am trying to combine the action from here and convert it to a unix time stamp using another action from line 108 from here. But I don't really know what to do.

Any help would be greatly appreciated :)

add_action("gform_pre_submission_2", "pre_submission_handler");
function pre_submission_handler($form){
    $_POST["input_12"] = sc_meta_box_save($post_id);
}

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AccurateDesign
AccurateDesign

ASKER

here is the solution from David Peralty:
"I have a field called Time Stamp. I gave it the CSS class of hidden. I added .hidden { display: none; } to my style.css. I checked off "allow populate dynamically" and just for fun I gave it a parameter of timestamp.

Here is what I have in my functions.php file: http://pastebin.com/u7zhZXYV"