Posted: November 13, 2013 at 4:15 pm
I was working on this a couple of months ago, and I got great help from Dean. (Here is the topic) Now I’m trying to have Event Espresso drop include the date format into the URL request to Time and Date’s website. I need to get the event date in the following format: YYYYMMDD Example: 20131113 for Nov 13, 2013 And I need to get the start time in the following format: HHMM Example: 1730 for 5:30 PM Can I pass a parameter to the event_date_display($start_date, get_option(‘date_format’)); function to get the information I need so I can get a dynamic date from Time and Date’s website? The URL where I’d drop it is similar to the following: http://www.timeanddate.com/worldclock/fixedtime.html?msg=Webinar&iso=20140101T1430&p1=220&ah=1 I want to replace the iso variable with iso=<?php –whatever function to get the date in the correct format — ?>T<?php –whatever function to get the start time in the correct format — >? The other variables tell Time and Date what time zone I’m already in. | |
I tried to pull the date and put it in a php variable, but I ended up breaking the page. I thought I could use http://php.net/manual/en/datetime.createfromformat.php but I don’t think my version of PHP is compatible. Any suggestions here? | |
Hi, You are close you just need to change the output format. It also depends where you are trying to do this as different pages have the data stored in different ways. For example, if you were to do this on the registration page, then adding this to the template would output what I think you need echo event_date_display($start_date, Ymd) . "T" . event_date_display($event->start_time, 'Hi'); Output (for my event) = 20131031T1100 You could use a similar thing elsewhere, but you may need to hunt for the start dates and time data (always check for $events or $event arrays). Date/time formats – http://php.net/manual/en/function.date.php | |
The support post ‘Using Time and Date website for Webinars’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.