Hi,
I need to combine a date field and hour field to show as one field. Is there a quick way to make this happen?
Thanks,
Andy
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)
- 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!