Magic ETL

Magic ETL

Does anyone know how to convert Google Analytics "Date Hour and Minute"?

Contributor
edited February 2022 in Magic ETL

Does anyone have a solution they are using in a Magic ETL to easily convert Google Analytic's Date Hour and Minute output into something resembling an actual date time?

datetime googlle.png

?

Tagged:

Best Answer

  • Coach
    Answer ✓

    You can use a formula tile to splice out the different parts and assemble it as a timestamp:

    1. TIMESTAMP(CONCAT (
    2.   LEFT(`Date Hour and Minute`, 4), '-',
    3.   SUBSTRING(`Date Hour and Minute`, 5, 2), '-',
    4.   SUBSTRING(`Date Hour and Minute`, 7, 2), ' ',
    5.   SUBSTRING(`Date Hour and Minute`, 9, 2), ':',
    6.   SUBSTRING(`Date Hour and Minute`, 1, 2)))


    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**

Answers

  • Coach
    Answer ✓

    You can use a formula tile to splice out the different parts and assemble it as a timestamp:

    1. TIMESTAMP(CONCAT (
    2.   LEFT(`Date Hour and Minute`, 4), '-',
    3.   SUBSTRING(`Date Hour and Minute`, 5, 2), '-',
    4.   SUBSTRING(`Date Hour and Minute`, 7, 2), ' ',
    5.   SUBSTRING(`Date Hour and Minute`, 9, 2), ':',
    6.   SUBSTRING(`Date Hour and Minute`, 1, 2)))


    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • @GrantSmith Awesome!

Welcome!

It looks like you're new here. Members get access to exclusive content, events, rewards, and more. Sign in or register to get started.
Sign In