@goyals05, I hope the above example is timestamp is String Time and not Epoch Time.
You can convert String Time in your old format to Epoch Time in new format using strptime() and then convert to string time of your new format using strftime()
In order to understand the conversion you can try the following run anywhere search:
| makeresults
| eval myTimeOld="2017-10-26T16:59:29.565+0200"
| eval myTimeNewEpoch=strptime(myTimeOld,"%Y-%m-%dT%H:%M:%S")
| eval myTimeNew=strftime(myTimeNewEpoch,"%Y-%m-%d %H:%M:%S")
You can cascade this conversion in a single eval like the following as well:
| makeresults
| eval myTimeOld="2017-10-26T16:59:29.565+0200"
| eval myTimeNew=strftime(strptime(myTimeOld,"%Y-%m-%dT%H:%M:%S"),"%Y-%m-%d %H:%M:%S")
Please try out and confirm.
@goyals05, I hope the above example is timestamp is String Time and not Epoch Time.
You can convert String Time in your old format to Epoch Time in new format using strptime() and then convert to string time of your new format using strftime()
In order to understand the conversion you can try the following run anywhere search:
| makeresults
| eval myTimeOld="2017-10-26T16:59:29.565+0200"
| eval myTimeNewEpoch=strptime(myTimeOld,"%Y-%m-%dT%H:%M:%S")
| eval myTimeNew=strftime(myTimeNewEpoch,"%Y-%m-%d %H:%M:%S")
You can cascade this conversion in a single eval like the following as well:
| makeresults
| eval myTimeOld="2017-10-26T16:59:29.565+0200"
| eval myTimeNew=strftime(strptime(myTimeOld,"%Y-%m-%dT%H:%M:%S"),"%Y-%m-%d %H:%M:%S")
Please try out and confirm.