Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a column in which i have Time as follows
Time
12.00 AM
12.14 AM
13.12 AM
03.30 PM
04.00 PM
02.30 AM
.
.
.
n numbers of rows
I want to assign it as following
Time Assign Value
12.00 AM 12.00 AM
12.14 AM 12.00 AM
13.12 AM 13.00 AM
03.30 PM 03.30 PM
04.00 PM 04.00 AM
02.30 AM 02.30 AM
.
.
n numbers of rows
Thanx in Advance
Something like this:
LOAD
Time,
Time(Floor(Time,1/48)) As [Assign Value]
FROM
.....
Are you rounding them down to nearest 30 minutes?
May be this:
LOAD Time,
Time(Floor(Time, (1/(24*2)))) as AssignValue -> my bad, Gysbert is right
Time(Floor(Time, (1/(24*30)))) as AssignValue
FROM Source;
Thanx
Thanx
Please close the thread if you got what you were looking for by marking correct and helpful answer. Thanks
hi
but for 8.00, 8.15, 8.30 it is assigning 8.00
it should not assign 8.30 to 8.00
please provide an example where the proposed expression converts 8.00 into 8.30
thanks
regards
Marco
I have a column in which i have Time as follows
Time
12.00 AM
12.14 AM
13.12 AM
03.30 PM
04.00 PM
02.30 AM
12.30 AM
12.40 AM
.
.
.
n numbers of rows
I want to assign it as following
Time Assign Value
12.00 AM 12.00 AM
12.14 AM 12.00 AM
13.12 AM 13.00 AM
03.30 PM 03.30 PM
04.00 PM 04.00 AM
02.30 AM 02.30 AM
12.30 AM 12.30 AM
12.40 AM 12.30 AM
.
n numbers of rows
Time component is in decimals so it is prone to rounding errors when you round, ceil or floor things. Check this link out where HIC talks about rounding error Rounding Errors.