Archive
Highlighted

Time Modifier "Beginning of Today"

Motivator

Hi,

is there a possibility to calculate with an time modifier that represents the beginning of "today"?
I would like to use this kind of modifier like the "now()" function. So the result of the "today" modifier would be 1385337600 as timestamp when i use it right now.

Best

Heinz

Tags (2)
0 Karma
Highlighted

Re: Time Modifier "Beginning of Today"

Builder

You can use
earliest=@d latest=now in your search mean starting the beginning of the day till now.
Hope that this will help

Highlighted

Re: Time Modifier "Beginning of Today"

Motivator

What about this:

...| eval today = strptime(strftime(now(),"%m/%d/%y"),"%m/%d/%y")

Get now epoch, then strip the hour, parse it, and then you get the epoch for today

regards

View solution in original post

Highlighted

Re: Time Modifier "Beginning of Today"

Legend

...or even easier,

eval today=relative_time(now(),"@d")
Highlighted

Re: Time Modifier "Beginning of Today"

Motivator

Definitely easier one 😉

0 Karma
Highlighted

Re: Time Modifier "Beginning of Today"

Motivator

Thanks to everybody for your input. The last approach works fine!

0 Karma