Token created:
<fieldset submitButton="false">
<input type="time" token="time_selected" searchWhenChanged="true">
<label>Select Time </label>
<default>
<earliest>-7d@h</earliest>
<latest>now</latest>
</default>
<change>
</change>
</input>
This is the field I used in where the token is needed:
| eval StartTime=strpTime("tokEarliest", "%Y-%m-%d %H:%M:%S"), EndTime= strpTime(TimeOfOrigin, "%Y-%m-%d %H:%M:%S.%q")
try this
| eval StartTime=strpTime("now()-7d@h", "%Y-%m-%d %H:%M:%S"), EndTime= strpTime(now(), "%Y-%m-%d %H:%M:%S.%q")
@sravankaripe
Thanks for your help, still having issues with it. So my time token is created, I just need to replace it with the hard coded date in the StartTime for the time user selects either previous week, or a particular date entered.
| eval StartTime=strpTime("2021-07-01 22:04:00", "%Y-%m-%d %H:%M:%S"), EndTime= strpTime(endingSeq, "%Y-%m-%d %H:%M:%S.%q")