I've been trying to convert "2016-09-12T10:16:51.000+00:00" into simple format i.e:
2016-09-12 10:16:51.
Tried using strptime and strftime
mysearch|eval _time=strptime(_time,"%Y-%m-%d%Z%T%c")| eval _time=strftime(_time,"%Y-%m-%d %H:%M") | timechart count
Any help will be appreciated.
Try this runanywhere sample.
| makeresults | eval x="2016-09-12T10:16:51.000+05:00" | eval y=strptime(x, "%Y-%m-%dT%H:%M:%S.%3N%z") | eval z=strftime(y, "%Y-%m-%d %H:%M:%S") | table x y z
Try this runanywhere sample.
| makeresults | eval x="2016-09-12T10:16:51.000+05:00" | eval y=strptime(x, "%Y-%m-%dT%H:%M:%S.%3N%z") | eval z=strftime(y, "%Y-%m-%d %H:%M:%S") | table x y z
It Worked. Thanks 🙂