Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

What does floor(Today()) do ?

Hi All,

I have a dashboard in which the creator has used the following script statement

 

Load

T_End-(floor(today())) as NoOfDaystoEndDate,
*;

I thought 'floor' was used for rounding down, and Today() for returning today's date. The statement doesn't make sense.

Can someone please explain what is happening ?

Thanks

MV

1 Solution

Accepted Solutions
Colin-Albert

floor() rounds a value down to the nearest integer.

For date-time fields, floow will remove the time portion so just the date part is used.

The script is calculating the difference between today's date

and T_End

Assuming that T_End is a date.

perhaps the command should be

floor( T_End - today() ) as NoOfDaystoEndDate

View solution in original post

3 Replies
Colin-Albert

floor() rounds a value down to the nearest integer.

For date-time fields, floow will remove the time portion so just the date part is used.

The script is calculating the difference between today's date

and T_End

Assuming that T_End is a date.

perhaps the command should be

floor( T_End - today() ) as NoOfDaystoEndDate

alexandros17
Partner - Champion III
Partner - Champion III

Floor(Today()) returns the same of (Num(Today()) so convert the date in its numerical representation, in this case nothing else because there is not time part ...

Not applicable
Author

Thanks both. That makes sense now. I never thought of the time element.