Hi there, I wish to split the [Moment] colum...

Hi there,

I wish to split the [Moment] column, which is DateTime format --> in 2 columns Day and Hour, with a Number format. I have no problem with the DAY function, result is ok.

1 - But I am struggling with the HOUR([Moment]) formula that returns the error โ€œParameter 1 of function HOUR is of the wrong typeโ€.

Iโ€™ve understood I need to have a Duration type for this function, so I was thinking of calculating duration from 0 to TIME([Moment]) but I cannot define this virtual column as duration.

2 - nor it works if I use the LEFT(TIME([Moment]),2) workaround. Error says โ€œParameter 1 of function LEFT is of the wrong typeโ€

Do you know what transformation I need to do or if there is an easy formula to split

[Moment] column into its components? I feel so nerd _ Thanks, have a good day.

0 3 585
3 REPLIES 3

The format should be like HOUR(TIME([Moment])-โ€œ00:00:00โ€)

@Aleksi_Alkio gosh, so easy! thanks, it works.

Youโ€™re welcome

Top Labels in this Space