Marketing Integrations

Damien
Contributeur | Partenaire solutions Elite
Contributeur | Partenaire solutions Elite

Date format when exporting to Google Sheet

Résolue

Hi all, we are using the Google Sheets integration to export a list of contacts from HubSpot to Google Sheets via a workflow. 

 

The problem is that the "Create Date" property comes through as a long number, rather than an actual date. Here are some examples of the date property as it comes out of HubSpot: 

 

1620710374103
1611800442730
1616609290112

 

I am not sure how this translates into an actual date and time, could it be some sort of counter? Either way, is there a way to convert this information into a date within Google Sheets? 

1 Solution acceptée
karstenkoehler
Solution
Au panthéon de la communauté | Partenaire solutions
Au panthéon de la communauté | Partenaire solutions

Date format when exporting to Google Sheet

Résolue

Hi @Damien,

 

For dates in Google Sheets, HubSpot sends unix timestamps in milliseconds. To convert dates from milliseconds, you would create a separate column and add the the following formular:

 

=arrayformula(if(A2:A<>"",(A2:A/1000)/ 86400 + DATE(1970, 1, 1),""))

 

... replacing column A with the colum that the unix timestamp is in.

 

Hope this helps!

Karsten Köhler
HubSpot Freelancer | RevOps & CRM Consultant | Community Hall of Famer

Beratungstermin mit Karsten vereinbaren

 

Did my post help answer your query? Help the community by marking it as a solution.

Voir la solution dans l'envoi d'origine

19 Réponses
czuriguel
Membre

Date format when exporting to Google Sheet

Résolue

Is more easy, only you need this formula:

 

EPOCHTODATE B2 )

 

(take into account the spaces, eliminate them)

 

🙂

EDelGaudio
Contributeur

Date format when exporting to Google Sheet

Résolue

Hello,

with the date before 1970, how we could solve?

0 Votes
BJakharia
Participant

Date format when exporting to Google Sheet

Résolue

Hi

This formula: =A1/1000/60/60/24 + DATE(1970,1,1) 

gives just the date whereas this timestamp has time in it too.

Is there any formula for:

1. Getting date + time both.

2. Getting just the time.

Also in which timezone we'll get this time and is it possible to convert this time into Pacific (with automatic day light saving) ?

SDay
Participant

Date format when exporting to Google Sheet

Résolue

I'm exporting dates to a word document through Zapier and then into Formstack. Is there a way to set an export format for dates that isn't in milliseconds, since I can't run a formula in my word doc?

saps
Membre

Date format when exporting to Google Sheet

Résolue

Not sure if that's what you're looking for. But Airboxr (my product) syncs with Hubspot to pull data into Google Sheets and standardizes all dates into YYYY-MM-DD format. 

Airboxr is slightly different from connectors in that: instead of dumping your data from Hubspot into Google Sheets, you use it to create queries as output (e.g., a pivot table of no. of new contacts added by date). You can save those queries as Hops (sort of like Zaps in Zapier) and retrieve the data from any Google Sheet.

You can learn more and claim your free trial here.


0 Votes
karstenkoehler
Solution
Au panthéon de la communauté | Partenaire solutions
Au panthéon de la communauté | Partenaire solutions

Date format when exporting to Google Sheet

Résolue

Hi @Damien,

 

For dates in Google Sheets, HubSpot sends unix timestamps in milliseconds. To convert dates from milliseconds, you would create a separate column and add the the following formular:

 

=arrayformula(if(A2:A<>"",(A2:A/1000)/ 86400 + DATE(1970, 1, 1),""))

 

... replacing column A with the colum that the unix timestamp is in.

 

Hope this helps!

Karsten Köhler
HubSpot Freelancer | RevOps & CRM Consultant | Community Hall of Famer

Beratungstermin mit Karsten vereinbaren

 

Did my post help answer your query? Help the community by marking it as a solution.

BOlson8
Participant

Date format when exporting to Google Sheet

Résolue

I think you answered the question and I tried your formula and I must have done something wrong because i got #ref1

0 Votes
EDelGaudio
Contributeur

Date format when exporting to Google Sheet

Résolue

How is the procedure to format the date BEFORE in workflow and not in Google sheet with formula?

0 Votes
JMolos
Membre

Date format when exporting to Google Sheet

Résolue

Hello Karsten!

How about the Created by user ID? I'm exporting that property in a Google sheet, but I came out as numbers.
Can you help me with this?
Thank you!

ryanjoconnor
Participant

Date format when exporting to Google Sheet

Résolue

How is this not addressed as a bug? Why would any user assume this to be the correct outcome? 

SKealy
Contributeur

Date format when exporting to Google Sheet

Résolue

Especially when the 'solution' also doesn't work. PLEASE FIX HUBSPOT

SKealy
Contributeur

Date format when exporting to Google Sheet

Résolue

This gave me the right format, but the wrong date, it's about a year in the past. 😕

thanhdoan
Participant

Date format when exporting to Google Sheet

Résolue

Fantastic and very useful. What formula would you use to produce the opposite? So standard date value (e.g., 13/06/2022) into a HubSpot unix timestamp?

 

Comment edited on 19/07/2022 - the answer is below.

 

(A2-DATE(1970,1,1))*86400000

0 Votes
PMontoya
Participant

Date format when exporting to Google Sheet

Résolue

this formula is not working correctly for me. Is there something else I should b replacing?

0 Votes
ChrisPot
Participant

Date format when exporting to Google Sheet

Résolue

Hello, 

 

I have found a formula which is working on my Gsheet "=epochtodate(A1;2)"

 

A1 needs to be replaced.

 

 

CEsposito
Participant

Date format when exporting to Google Sheet

Résolue

What does A1 need to be replaced by? 

0 Votes
fabiogomesds
Participant

Date format when exporting to Google Sheet

Résolue

best way! thanks!

Leopoldo
Participant

Date format when exporting to Google Sheet

Résolue

Works perfect! thanks!!

0 Votes
spagnotta
Participant

Date format when exporting to Google Sheet

Résolue

Hi @PMontoya, it didn't work for me either at first, until I changed the format to date (Format > Number > Date). Hope this helps! 

0 Votes