2 of 2 people found this helpful
In either Tableau Prep or Tableau Desktop, you can simply change the data type to Date & Time
Tableau will parse the time correctly and assume a date of 1/1/1900. The date doesn't matter to you, so in Tableau Desktop, right-click the field and select Default Properties > Date Format
and use a Custom Format string like h:nn:ss AMPM
Now, Tableau will sort the field correctly (because it knows it's a Date + Time), but will only display the time portion based on the default format.
There are a few ideas that you can vote on to let the developers know that a Time data type (as opposed to a Date + Time) would be helpful. Here's one: https://community.tableau.com/ideas/3315
But the good news is you can accomplish what you want. And I would suggest that this is a case where Desktop alone probably does everything you need without complicating the source. But it's nice to know it works the same in Tableau Prep too.
Hope this helps!
It would be really nice if we could have Tableau Prep be sensitive to date region, like Desktop is. As far as I know, I have never had to tell Desktop to use the Australian date format, rather than the back-to-front (ahem!) US date, but Tableau Prep constantly confuses me, and I can't find a way to change the default date format.
Anyone have any clues? I am constantly confused by whether I am look at mm/dd or dd/mm dates.