• SPEForums need your contributions to build up a strong repository of performance engineering resources.

Help Required*************** I want to pass...

R

Ravi Goel

Guest
Help Required*************** I want to pass time-stamp in my script in following format - 5/4/16 12:51 PM I am using below - lr_save_datetime("%m/%d/%y %H:%M %p", DATE_NOW, "currDateTime"); lr_output_message(lr_eval_string("{currDateTime}")); This is generating below timestamp - 05/04/16 13:25 PM but I need 5/4/16 12:51 PM ( I dont need those zeros in month and date) I tired some string trimming but that didnt help. Can anyone give a solution to this?
 
Parametrize the value with "Date/Time" parameter type and use the format %#m/%#d/2016 %I:%M %p
 
Arjun Nambi .. thanks ...following worked ( # was required as you suggested) -
 
lr_save_datetime("%#m/%#d/%y %H:%M %p", DATE_NOW, "currDateTime"); lr_output_message(lr_eval_string("{currDateTime}"));
 
on top of the request write web_save_timestamp_param
 
Back
Top