Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How do I use floor function for date?
Thanks
You can use to get just the date (excluding the time). For example try this:
Date(Floor(Now())) -> will give you just the date
Time(Frac(Now())) -> will give you just the time
Clearly it removes time part from the date
first try this in text object
=Now()
then try this
=Date(Floor(now()))
you will find the difference
See if the attached helps:
What is the diff btw =Date(Floor(now())) & =Date(now())... I see both returning same value
This is old thread, Some how look Floor() in help - Floor ‒ QlikView
Saw that.. But not able to understand clearly.. On what circumstances floor func will be useful in Biz cases? any simple example / illustration ?
Example is there where we use floor() and ceil() in qlikview?
TY!
Ceil function will round up a number. Ex: ceil(3.4) will return 4.
Floor will round down a number. Ex: floor(3.4) will return 3.
I use this when working with timestamps with hour and minutes values. Behind each date there's a number associated. Those dates with time, will have a decimal value (56321,23) where 23 represents the time and minutes (this is a random example!).
When in your model you don't need to use the hour, you can use ceil(Date) so your dates will always be DD/MM/YYYY 00:00:00 instead of DD/MM/YYYY 10:36:00.
This can also be used to format values. If you are working with big amounts, it might not tell you much to show the decimal. Instead of showing $26.354.201,31, you can use the ceil or floor function and round up/down the number, or using the format in the Number tab for the charts.
Advantage: It will helps to save lot of memory since it trims of timestamp.
For More: Get the Dates Right
-Siva