• Skip to primary navigation
  • Skip to main content
  • Skip to footer
  • EnglishEnglish
The Information Lab Netherlands

The Information Lab Netherlands

Tableau & Alteryx Software Partner

  • +31 (0) 20 261 4741
  • FREE TRIAL
  • Home
  • Tableau
    • Overview
    • Licenses
    • Creator
    • Explorer
    • Viewer
    • Desktop
    • Server
    • Online
    • Prep Builder
    • Prep Conductor
    • Tableau Embedded Analytics
  • Alteryx
    • Designer
    • Server
  • Industries
  • Data Culture
  • Training
  • Consultancy
  • Support
  • Events
  • Blog
  • About us
    • Contact
    • Team
    • Working at
      • Tableau & Alteryx Consultant

How to turn a string into a date in just two steps

You are here: Home / Blog / All / How to turn a string into a date in just two steps

28 September 2020 by Gaia Pometto

How many times have you turned a a sting into a date in Alteryx? Learn a new trick to deal with custom date formats more efficiently in this blog!

Let’s say that you want to turn a string field into a date or datetime field. The field looks like this: 

Turn string into a date step one

How do we turn it into a datetime field?

The most natural thing to do might be to use the DateTime tool. Unfortunately, our fields’s format does not correspond to any available datetime format available in the tool. Therefore, we will need to select “Custom” under “Select the format that matches the incoming string field” and type: yyyy-mm-ddThh:mm:ss

Step two, the datetime field

How to do deal with custom date formats in two steps:

However, if you are like me, you won’t enjoy having to type the exact date format. Luckily, there’s a short and sweet alternative solution! Here it is:

STEP 1

Use Formula Tool and type: Replace([date_time], ‘T’, ‘ ‘)

STEP 2

Drag in a Select Tool and change the field’s data type to datetime.

…and you’re good to go! You know how to turn a string into a date!

For a practical example of this trick, check out DavidP’s workflow here.


Wanna learn more about Tableau or Alteryx? Do you want to use these tools to their full potential? Check out our trainings and consultancy services!

Category iconAll

Recente blogposts

  • Alteryx – How to calculate the Month-over-Month growth in 3 steps
  • How to: Pattern bar chart

Footer

Stay up to date

Once per month we will send a newsletter with the latest Tableau & Alteryx tips and Tricks, and links to the most interesting content on the internet. Subscribe below.

The Information Lab Netherlands B.V.

MediArena 2
1114 BC  Amsterdam

T: +31 20 261 4741
E: info@theinformationlab.nl

Youtube channel
LinkedIn
Twitter

© 2019 The Information Lab Netherlands B.V. – Algemene Voorwaarden

We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok