Need help with StresStimulus? Start here.
Converting Extracted Tick Time to Normal date Form
Unregistered User Posts: 514
10/13/2021
|
We need to fetch Tick time which is coming in previous response. I am using extractor to fetch same. We need to convert this Tick Time to Normal date Format and use in next request. Please suggest if we have any option to convert
|
|
0
link
|
George @StresStimulus Administrator Posts: 567
10/13/2021
|
To convert extracted Ticks time to regular time, you will need to use scriptable variables as described https://support.stresstimulus.com/display/doc54/Scriptable+Variables Below is pseudo code: /// <summary> /// Return a value for the given session context. /// </summary> /// <param name="session">The session context object of the request consuming the variable.</param> /// <returns>The source variable value.</returns> string IExternalVariable.GetValue(SessionContext context) { var s_ticks = context.ExtractorRuntime.GetExtractorValue("TickDate"); //TickDate is the extractor that returns ticks long ticks; if (long.TryParse(s_ticks, out ticks)) return new DateTime(ticks).ToString(); return ""; }
|
|
0
link
|
Copyright © 2025 Stimulus Technology