engine:import:setvar2date
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
engine:import:setvar2date [2018/08/14 21:17] – created dcumming | engine:import:setvar2date [2025/01/21 22:07] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | setvar2date | + | ====== SetVar2Date ====== |
- | ==== SetVar2Date ==== | ||
Set a local variable to a date value. | Set a local variable to a date value. | ||
- | ==== Phase ==== | + | ===== Phase ===== |
This instruction is used by the TapeTrack INI Engine. | This instruction is used by the TapeTrack INI Engine. | ||
- | ==== Syntax ==== | + | ===== Syntax ===== |
- | **SetVar2Date**// | + | |
- | // | + | '' |
- | // | + | |
- | // | + | |
- | |varname| | + | ^ Variable ^ Type ^ Description ^ Min Length ^ Max Length ^ |
- | |date| The string representing the date required in one of the following | + | |varname| |
+ | |date| String | ||
+ | |value | String | The date value in strfdate(3) format | 1 | 64 | | ||
- | |*[+|-]n| Today' | + | ^ Date Variable Formats^ Description^ |
+ | |*[+< | ||
|*| Today.| | |*| Today.| | ||
|*-100| 100days ago.| | |*-100| 100days ago.| | ||
Line 23: | Line 23: | ||
|YYYY-MM-DD| The date in ISO date format.| | |YYYY-MM-DD| The date in ISO date format.| | ||
|2010-12-31| The 31st of December 2010.| | |2010-12-31| The 31st of December 2010.| | ||
- | |Y|y[+|-]n[+|-]m[+|-]d| The beginning or end of the year, + or - a number of years, + or - a number of months, + or - a number of days.| | + | |< |
- | Y-0 | + | |Y-0| The start of the current year.| |
- | y-0 | + | |y-0| The end of the current year.| |
- | Y-1 | + | |Y-1| The start of last year.| |
- | Y-1+3+3 | + | |Y-1+3+3| |
- | Y+10+3+3 | + | |Y+10+3+3| |
- | The start of the current year. | + | |< |
- | The end of the current year. | + | |M-0| The start of the current month.| |
- | The start of last year. | + | |m-0| The end of the of the current month.| |
- | The 3rd day of the third month of last year. | + | |M-1| The start of last month.| |
- | The 3rd day of the 3rd month of the year 10 years | + | |M-1+3| |
- | from now. | + | |
- | M|m[+|-]m[+|-]d The beginning or end of the month, + or - a number of | + | |
- | months, + or - a number of days. | + | ===== Example |
- | M-0 | + | |
- | m-0 | + | Set variable YESTERDAY to yesterday' |
- | M-1 | + | |
- | M-1+3 | + | < |
- | The start of the current month. | + | |
- | The end of the of the current month. | + | |
- | The start of last month. | + | |
- | The 3rd day of last month. | + | |
- | value The date value in strfdate(3) format. | + | |
- | Examples | + | |
- | Example | + | |
SetVar2Date(YESTERDAY, | SetVar2Date(YESTERDAY, | ||
WriteMsg(" | WriteMsg(" | ||
- | Example A.18. SetVar2Date: | + | </ |
- | END to the last. | + | |
+ | |||
+ | Set variable START to the first day of this year and END to the last. | ||
+ | |||
+ | < | ||
SetVar2Date(START, | SetVar2Date(START, | ||
SetVar2Date(END, | SetVar2Date(END, | ||
- | 66 | ||
WriteMsg(" | WriteMsg(" | ||
+ | </ | ||
+ | |||
+ | {{tag> import_engine sync_engine}} |
engine/import/setvar2date.1534281423.txt.gz · Last modified: 2025/01/21 22:07 (external edit)