Forum Discussion
If the field includes the date and time, the field type is 'timestamp', otherwise it's 'date'.
So you could add:
{% elif field['type'] == 'timestamp' -%}
<td>{{ record[field['id'] | string]['value'] | date_mdy }}</td>
Doug, thanks for your reply.
I've been trying a bunch of different ways to format the timestamp data to a simple date, with no luck yet.
I get a validation error after inserting the code you suggested, so I'm still in search of a means of formatting the timestamp.
Mark Corcoran
- DougHenning13 months agoCommunity Manager
Ahh, it's missing the conversion from string to date/time and the field type was incorrect. Try this:
{% elif field['type'] == 'date time' -%} <td>{{ time.parse(record[field['id'] | string]['value']) | date_mdy }}</td>
- MarkCorcoran3 months agoQrew Cadet
The field type is "timestamp" (checked this through the api portal - "label": "Date Qualified", "type": "timestamp") However, your revised code still worked! - Awesome, now I can move on with my life..haha.
Thanks for your help, I really appreciate your effort more than you know.
Mark Corcoran