Skip to main content

Hi,

 

I hope everyone is well. I have linked my MySql database to Google Sheets. It works fine except for the date fields. The date field, for example ‘03/04/2020’ shows as ‘1583272800’ on the Google Sheet.

 

Any assistance would be appreciated.

 

Thank you

That can be addressed a few ways.

The date format you’re seeing is a UNIX timestamp: https://en.wikipedia.org/wiki/Unix_time

OPTIONS

You can adjust the formatting of the column in the GSheet to the desired date format.

Location: Top nav bar > Format

 

You can add a formula in the GSheet step for the field to set the format of the date.

Example:

 

You can add a Formatter step in the Zap to set the format of the date to MM/DD/YYYY

App: Formatter > Date/Time > Format


You can also solve this by converting the UNIX time to datetime in the mysql query itself. You can cast unix time to datetime by using the FROM_UNIXTIME() function

 

Example

SELECT coumn1, column2 FROM_UNIXTIME(column3_date) FROM table

Thank you guys, I appreciate it. Problem solved!