Skip Navigation

[Closed] Problem with converting a date inside the loop

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 8 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 -
- - - - - - -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Waqas 8 years, 7 months ago.

Assisted by: Waqas.

Author
Posts
#329479

I am trying to convert a date inside a view.
The date is inside a WordPress (!) custom field value fetched by the view.
I expected to see the possibility to format the date by adding format="m.d.Y" but this doesn't seem to work with WordPress Custom Fields added to a post.

[wpv-post-field name="activiteit_begindatum"]

Above is what I see in my view. How do I format the value activiteit_begindatum if format="m.d.Y" doesn't do the trick ? Again this is a custom field added to a WordPress post and queried by a view.

#329568

Waqas
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

You can use Types short code for this:

[types field="my-date" format="Y/m/d g:i:s A"][/types]

Please see https://toolset.com/documentation/customizing-sites-using-php/functions/#date

While, [wpv-post-field] has no such option (https://toolset.com/documentation/views-shortcodes/#wpv-post-field).

Please let me know if this resolves your issue or if you need more assistance. In the later case, can you please provide some debug information about your site? Please see https://toolset.com/faq/provide-debug-information-faster-support/ for more information.

I have enabled debug information area for your next reply.

The topic ‘[Closed] Problem with converting a date inside the loop’ is closed to new replies.