Title: datetime in template
Last modified: November 25, 2023

---

# datetime in template

 *  Resolved [jakoblj](https://wordpress.org/support/users/jakoblj/)
 * (@jakoblj)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/datetime-in-template/)
 * Thank you for the widget, exactly what I needed..
 * I get a API response with time H:M:S
 * Tried datetime to only get hours and minutes but can’t get it to work?
 *     ```wp-block-code
       <h3>Avgångar från Telefonplan</h5> {subloop-array:Departure:5}<br> {Departure.direction}<br> {Departure.time:datetime,H:i}<br> {/subloop-array:Departure}<br>
   
       Alsp, how to remove parts of the response? I tried to remove everything after first word with: 
   
       Departure:<br>
       {subloop-array:Departure:5}<br>
           direction = {Departure.direction|split(" ", 1)}<br>
           time = {Departure.time|date("H:i")}<br>
       {/subloop-array:Departure}<br>
       serverVersion = {serverVersion}<br>
       ```
   
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fdatetime-in-template%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [berkux](https://wordpress.org/support/users/berkux/)
 * (@berkux)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/datetime-in-template/#post-17229226)
 * Hi Jakob,
 * see [https://doc.json-content-importer.com/json-content-importer/free-show-the-data/](https://doc.json-content-importer.com/json-content-importer/free-show-the-data/)
   for datetime.
 * And here:
 * [https://api.json-content-importer.com/free-ifnotemptyaddleftright-and-format-date-time/](https://api.json-content-importer.com/free-ifnotemptyaddleftright-and-format-date-time/)
 * Thank you for using the JCI Plugin,
 * Bernhard
    -  This reply was modified 2 years, 7 months ago by [berkux](https://wordpress.org/support/users/berkux/).
 *  Thread Starter [jakoblj](https://wordpress.org/support/users/jakoblj/)
 * (@jakoblj)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/datetime-in-template/#post-17230295)
 * Thankyou! Solved the time problem.
 * Can you also point me in the right direction how to handle the output from the
   API like
   “Fruängen (Stockholm kn)” to get rid of the part in the parentheses?
   Sorry, just an amateur… 🙂
 *  Plugin Author [berkux](https://wordpress.org/support/users/berkux/)
 * (@berkux)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/datetime-in-template/#post-17231059)
 * Hi Jakob,
   <<Can you also point me in the right direction how to handle the output
   from the API like“Fruängen (Stockholm kn)” to get rid of the part in the parentheses?
   >>You can’t, sorry. The free JCI Plugin can only add text but not alter it. Can
   you change the JSON?Bernhard

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘datetime in template’ is closed to new replies.

 * ![](https://ps.w.org/json-content-importer/assets/icon-256x256.png?rev=3464653)
 * [Get Use APIs - JSON Content Importer](https://wordpress.org/plugins/json-content-importer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/json-content-importer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/json-content-importer/)
 * [Active Topics](https://wordpress.org/support/plugin/json-content-importer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/json-content-importer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/json-content-importer/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [berkux](https://wordpress.org/support/users/berkux/)
 * Last activity: [2 years, 7 months ago](https://wordpress.org/support/topic/datetime-in-template/#post-17231059)
 * Status: resolved