Forum Discussion
Combining Date columns
- 7 years ago
Hi Anonymous,
Based on my test, you could refer to below ways:
You could use TIMEVALUE function to fetch the time data, refer to below formula:
Time = CONCATENATE(TIMEVALUE('Table1'[Date_Time_Start]),CONCATENATE("~",TIMEVALUE('Table1'[Date_Time_End])))Result:
Or you could use the RIGHT function to fetch the time value:
Time2 = CONCATENATE(RIGHT('Table1'[Date_Time_Start],11),CONCATENATE("~",RIGHT('Table1'[Date_Time_End],11)))Result:
You could also download the pbix file to have a view.
Regards,
Daniel He
Hi Anonymous,
Based on my test, you could refer to below formula:
Time = CONCATENATE('Table1'[Date_Time_Start],CONCATENATE("~",'Table1'[Date_Time_End]))
Result:
Regards,
Daniel He
- Anonymous7 years agoNot applicable
Now my only issue is that the time start and time end columns were originally in Date/time format so in the new column it is showing me both the dates and times as text, I cannot change the column data type without receiving an error and I cannot change the edit the data because the date is used for a relationship. How may I further format this new column to hide the dates and only show time?
- v-danhe-msft7 years agoMicrosoft Employee
Hi Anonymous,
I could not understand the format of your data, you have posted your original data as below:
original columns:
Date_Time_Start: 8:00:00 AM
Date_Time_End 8:30:00 AM
Could you please post what your data look like in your data view?
Regards,
Daniel He
- Anonymous7 years agoNot applicable
I had forgotten that I formatted the data beforehand. The original data is in the format 'MM/DD/YYYY HH/MM/SS am/pm" So when using the code given here I get a format of date and time in text. I am unable to remove the date from the new colum
- Anonymous7 years agoNot applicable
Thank you.