prakashbhanu407,
index=foo_bar | eval WeekOfYear= strftime(_time, "%V")
The above will format the time to the 'WeekOfYear'. From there, you can perform a modulus against the week like below.
index=foo_bar | eval WeekOfYear = strftime(_time, "%V") | eval ret_val = WeekOfYear % 2
Therefore, if ret_val == 0, it's EVEN. ret_val == 1, it's ODD.
prakashbhanu407,
index=foo_bar | eval WeekOfYear= strftime(_time, "%V")
The above will format the time to the 'WeekOfYear'. From there, you can perform a modulus against the week like below.
index=foo_bar | eval WeekOfYear = strftime(_time, "%V") | eval ret_val = WeekOfYear % 2
Therefore, if ret_val == 0, it's EVEN. ret_val == 1, it's ODD.
Thanks a Ton !!!
Wow It is so simple ...I was not aware of "%V", I was working on stripping the fields from current date.
You're welcome!