Here is a simple example to make it easier to do recurring tasks with a date via the clipboard in QTP, especially for appointments - very time-saving!
Content:
1.) ... Recurring tasks with dates via the clipboard!
2.) ... Further formulas for adding days, weeks or months
3.) ... What should be considered when adding days to dates?
1.) Recurring tasks with dates via the clipboard!
Example for tomorrow:
%d+1% %YYYY%.%MM%.%DD%
Example for next week same day:
%d+7% %YYYY%.%MM%.%DD%
Example for next month first working day
%nmfd% %mfwd% %YYYY%.%MM%.%DD%
Info:
%nmfd% = Jump to the first day of the next month
%mfwd% = Jump to the first working day Mon-Fri in this month Call
example calendar and time field:
%C% %T% %LDF% %LTF%
Info:
%C% = opens the calendar
%T% = opens the time entry field
%LTF% = 10:06:42 (local time format)
%LDF% = Friday, December 09, 2022 (local date format)
More info :
►► Automated date and time format in QTP for MS Windows!
2.) Further formulas for adding days, weeks or months
%d+1% current date + 1 day
%d+7% current date + 7 days (1 week)
%d+0% Back to current date
%d+-1% Yesterday, -2, -3, .... Date
%lwdim:1% Last weekday 1 of month (last Monday of this month)
%lwdim:5% Last weekday 5 of month (last Friday of this month)
%lwdiq:1% Last weekday 1 of quarter (last Monday of this quarter )
%nmfd% Jump to the first day of the next month
%mld% Jump to the last day of this month
%mlwd% Jump to the last working day Mon-Fri this month
%mlWD% Jump to the last working day Mon-Sat this month
%qld% Jump to the last day of this quarter
%qlwd% Jump to the last working day Mon-Fri of this quarter
%qlWD%Jump to the last working day Mon-Sat this quarter
%mfd% Jump to the first working day this month
%mfwd% Jump to the first working day Mon-Fri this month
%mfWD% Jump this month to the first working day Mon-Sat
%qfd% % qfwd% %qfWD% same for quarter
%wd:3% Jump to next Wednesday (0 to 6 = Sun,Mon,...Sat)
%addd+1% Add day(s) to current time
3.) What should be considered when adding days to dates?
The added number of days, months, weeks, ... must always be at the beginningExample: %d+1%%LTF%
Combinations are also possible
Example: %d+1% %d+1% %LTF% or %nmfd% %d+-1%
See also: