loadrunner Anyone has experience with comparing dates in...

  • Thread starter Oleg Koma Novsky
  • Start date
  • perf-test.com need your contributions to build up a strong repository of performance engineering resources.

O

Oleg Koma Novsky

Guest
Anyone has experience with comparing dates in Loadrunner? In runtime I need to compare Today's date (Now) against one provided by data sheet (EndDate) Here are the values I am generating: Action.c(18): Notify: Parameter Substitution: parameter "Now" = "01/07/2013" Action.c(18): Notify: Parameter Substitution: parameter "EndDate" = "12/05/2013". I tried 'stricmp' statement and it's always returns -1 result = stricmp( lr_eval_string("{Now}"), lr_eval_string("{EndDate}") );
 
Good to know I can still get some things right still. I've been out of practice for a few years. I strongly suggest that you look carefully at the excellent examples and instruction in the function help built in. Just select your C function and press F1. Great stuff!
 
Yeah, and if the current exams still let you use the online help functions, F1 is definitely your friend. To be quite honest the VUGEN help system is quite good for learning basic C coding skiils. It's nice they have examples for nearly every call imaginable.
 
After all this is not working for dates I am trying strcmp( lr_eval_string("{Now}"), lr_eval_string("{EndDate}") ); Where: Now = "01/16/2013" EndDate = "01/14/2014" Looks like it thinks that Now > EndDate b/c 16 > 14. If I change 14 to 16 then Now < EndDate I realize this is not a true date comparison so any help is highly appreciated