Ir para o conteúdo principal

Dates from Custom Fields

em Date and Time Operations
Lista de autores
Publicado: 16 de mar. de 2017|Última atualização: 3 de nov. de 2022

If you’re retrieving a date stored in a custom field, it is stored as an integer timestamp rather than real date types, so you need to pass it through the FROM_UNIXTIME function first, e.g.:

SELECT DATE_FORMAT(FROM_UNIXTIME(tickets.custom_data[1]), '%Y-%m-%d') AS 'Date
copy
ÚtilNão útil
próxima páginaFinding an Interval between Two Date/Times
página anteriorRelative Dates with Placeholders

Por favor, faça login ou registre-se para enviar um comentário.