Tableau: How do I combine a date field with a time field?
Category:
Question ID: 109858
0
0

Hi,

I need to combine the date and hours (time)  field to show as one.  Is there a quick way to make this happen?

Thanks,

Andy

Marked as spam
Posted by (Questions: 4, Answers: 14)
Asked on October 9, 2020 12:13 pm
99 views
Answers (1)
0
Private answer

Hi Andy,

Yes, you can quickly combine a date and time field by using the below calculation.

Concatenate your DATE field (10/1/2020) and your Time field (1/1/1900 20:14:30)

You will need to create a date field + time field:

Date + Time

DATEADD(

'hour', DATEPART('hour', [Time field]), DATEADD(

'minute', DATEPART('minute', [Time field]), DATEADD(

'second', DATEPART('second',[Time field]), [Date field])))

================

Results: 10/1/2020 20:14:30

 

Happy Tableau-ing!

Marked as spam
Posted by (Questions: 13, Answers: 4)
Answered on October 12, 2020 8:51 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top