HubDB - Retrieving date value

Regular Contributor

Hi all,

 

Just delving into HubDB myself and can see it replacing a lot of the ways I use custom modules. Hoping someone can help me:

 

I'm creating an events calendar here: http://www.hubmate.co/keynote/events-popup-form?hs_preview=kFyzfaNo-4535144317 I'm having a problem to retrieving the value from a date field however. If you check below the calendar you can see I'm playing around with some HubL, being:

 

{% for row in hubdb_table_rows(400082) %}
{{ row.event_name }}
{{ row.event_url }}
{{ row.event_date }}
{% endfor %}

 

The value from the date field is not printing the way I would expect it to (currently 1479686400000). Am I missing something? I suspect it's because I need to format the value with another HubL property? Any pointers would be very welcome.

 

Great addition for us Hubspot developers! Smiley Very Happy

2 Replies 2
Highlighted
Regular Contributor

Hi,

 

I think you could use the datetimeformat-filter.

 

When you change {{ row.event_date }} to {{ row.event_date|datetimeformat('%B %e, %Y') }} you should get the date in a format like  "December 31, 2016" instead of the timestamp.

 

More Infos about datetimeformat and how to configure the formats: http://designers.hubspot.com/docs/hubl/hubl-supported-filters

 

Hope this helps. 

Best regards

Thomas

 

 

 

 

 

 

Community Manager

Hey @Hubmate welcome to the Community - great to here your feedback on HubDB.

 

I wanted to let you and @ThomasReitz know that our Product Marketing Manager for the COS Tools, Jeffrey Vocell, is hosting an Ask Me Anything thread this coming Wednesday, you can post your questions on best pratice tips/tricks here now  - I hope you find this helpful! Smiley Happy

 

 

Reply
0 Upvotes