<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Get Unixtimestamp of given date time in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Get-Unixtimestamp-of-given-date-time/m-p/848651#M35819</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074"&gt;@Jaycee_Lewis&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Thank you for the reply. I thought we could just pass the date time to get unixtimestamp value.&lt;/P&gt;</description>
    <pubDate>Wed, 13 Sep 2023 02:42:14 GMT</pubDate>
    <dc:creator>VRandima</dc:creator>
    <dc:date>2023-09-13T02:42:14Z</dc:date>
    <item>
      <title>Get Unixtimestamp of given date time</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Get-Unixtimestamp-of-given-date-time/m-p/845380#M35758</link>
      <description>&lt;P&gt;I tried the&amp;nbsp;&lt;SPAN&gt;unixtimestamp()&amp;nbsp;&lt;/SPAN&gt;hubl function to convert date time to unixtimestamp but it was not successful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried like the following.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN&gt;unixtimestamp("2023-09-16 00:00:00")&amp;nbsp; =&amp;gt; no result&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;unixtimestamp(2023-09-16 00:00:00) =&amp;gt; no result&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;unixtimestamp('2023-09-16 00:00:00') =&amp;gt; no result&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;unixtimestamp(`2023-09-16 00:00:00`) =&amp;gt; no result&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;Wanted to know how should I pass the date to get the result.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Wed, 06 Sep 2023 09:04:22 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Get-Unixtimestamp-of-given-date-time/m-p/845380#M35758</guid>
      <dc:creator>VRandima</dc:creator>
      <dc:date>2023-09-06T09:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: Get Unixtimestamp of given date time</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Get-Unixtimestamp-of-given-date-time/m-p/846428#M35783</link>
      <description>&lt;P&gt;Hey,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/541027"&gt;@VRandima&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; Did you get this worked out?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If not, I have a few questions to help our community better understand your issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To clarify, the HubL function unixtimestamp() will either render&amp;nbsp;&lt;SPAN&gt;the timestamp of &lt;STRONG&gt;now&lt;/STRONG&gt; or you can optionally supply a datetime &lt;STRONG&gt;object&lt;/STRONG&gt;&amp;nbsp;you provide. We can see this in the example from the documentation — &lt;A href="https://developers.hubspot.com/docs/cms/hubl/functions#unixtimestamp" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;unixtimestamp&lt;/STRONG&gt;&lt;/A&gt;, where `(d)` represents the object to be converted:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="css"&gt;{{ unixtimestamp(d) }}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Typically, you'd use Python or JavaScript to handle creating the datetime object. Here's a simple example I found using Javascript&amp;amp;colon;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;let d = new Date("2023-09-16 00:00:00");&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And the specifics will be dependent on how you are set up and the tools you are using. Otherwise, if you are pasting in raw string or an uninitialized variable, it won't work the way you want it to.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Jaycee&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 20:34:07 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Get-Unixtimestamp-of-given-date-time/m-p/846428#M35783</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2023-09-07T20:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: Get Unixtimestamp of given date time</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Get-Unixtimestamp-of-given-date-time/m-p/848651#M35819</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074"&gt;@Jaycee_Lewis&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Thank you for the reply. I thought we could just pass the date time to get unixtimestamp value.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 02:42:14 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Get-Unixtimestamp-of-given-date-time/m-p/848651#M35819</guid>
      <dc:creator>VRandima</dc:creator>
      <dc:date>2023-09-13T02:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: Get Unixtimestamp of given date time</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Get-Unixtimestamp-of-given-date-time/m-p/849130#M35832</link>
      <description>&lt;P&gt;Hey,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/541027"&gt;@VRandima&lt;/a&gt;!&amp;nbsp;Thank YOU for asking this question &lt;span class="lia-unicode-emoji" title=":raising_hands:"&gt;🙌&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It took me a sec to understand “what” the documentation was saying there. I learned something new too.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To me, the docs assume that you'll know what to do with the second option. But they don't give any clues in this case, it's not obvious. I don't think it's meant to be frustrating. But I do think it assumes about knowledge and experience that we'd all have by default.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have fun building! — Jaycee&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 19:07:32 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Get-Unixtimestamp-of-given-date-time/m-p/849130#M35832</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2023-09-13T19:07:32Z</dc:date>
    </item>
  </channel>
</rss>

