Skip Navigation

[Gelöst] Convert Unix Timestamp in to dd/mm/yyyy

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

Problem:

My problem is in a view. i have a field "post-date" and it is shown in the front end every time in the unix timestamp.

Solution:

The problem was a plugin which has change the wordpress date format in the unix timestamp.

Relevant Documentation:

This support ticket is created vor 5 Jahren, 8 Monaten. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

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

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Dieses Thema enthält 3 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von SteffenM1628 vor 5 Jahren, 8 Monaten.

Assistiert von: Luo Yang.

Author
Artikel
#1218333
Bildschirmfoto 2019-03-20 um 18.13.14.png

Hey there,
my problem is in a view. i have a field "post-date" and it is shown in the front end every time in the unix timestamp.

Could you help me fix this with javascript?
my id of the dat is #datestamp.
Therefore i am very bad in jquery or javascript.

hope you can guide my with a simple function on pageload.

Thank you so much.

#1218532

Hello,

How do you setup/create the custom field "post-date"?
If it is a custom date field created with Types plugin, you can output the date value as the format you wanted, for example:

[types field="post-date" format="d/m/Y"][/types]

See our document:
https://toolset.com/documentation/customizing-sites-using-php/functions/#date
format:
any valid WordPress date format

If it is a post field created with other plugins/theme, you can also convert it under Types control, then display the field value with above Types shortcode too, see our document:
https://toolset.com/faq/how-do-i-convert-existing-custom-types-and-fields-to-types-control/#converting-custom-fields
Section "Converting custom fields"

#1219059

Hey Luo,

thanks for your reply. Unfortunately it is a bit complicated in my case.
I use the toolset postdate shortcode in an elementor template.
this elementor template sits via its shortcode in a view loop.

And at this point the dateformat changes to the unix.
I know that is not officially supported to put elementor shortcodes in the view loop, but it works very great.
Except for the postdate field. Therefore i need help to get a workaround with javascript to modify the unix back to a dateformat.

hope you can help me fix this!

thank you so much.
cHeers

#1219260

My issue is resolved now.

The problem was a plugin which has change the wordpress date format in the unix timestamp.
Thanks for your help Luo.