Difference between revisions of "Time-based Stored Queries"
From SDU
(New page: Time-Base Queries are used in Stored Queries to make DateTime WHERE clauses possible. This is partly described in ''Unicenter Service Desk Modification'' Guide in the ch...) |
m |
||
| Line 43: | Line 43: | ||
| YESTERDAY || || || | | YESTERDAY || || || | ||
|} | |} | ||
| + | |||
| + | |||
| + | ---- | ||
| + | <div align='center'><font color="red">To make corrections or additions to this article, select the ''edit'' tab above.<br> | ||
| + | To discuss or ask questions about this article, select the ''discussion'' tab above.</font></div> | ||
| + | |||
| + | [[Category:Configuration]] | ||
Revision as of 11:48, 26 June 2008
Time-Base Queries are used in Stored Queries to make DateTime WHERE clauses possible. This is partly described in Unicenter Service Desk Modification Guide in the chapter 4. Customization of Queries and Messages.
You can use an exact date in the Time-Based Stored Queries or counted time using one of these 2 functions: <source lang="javascript">StartAtTime (timespan-name)</source> returns begin of the timespan's period. <source lang="javascript">EndAtTime (timespan-name)</source> returns end of the timespan's period.
Timespans
Timespans are simple string values (so must be enclosed in simple quotes leaded by backslash).
Here are possible timespan names (Let actual date and time be 26.6.2008 11:07:35):
| Name | StartAtTime | EndAtTime | Comment |
|---|---|---|---|
| AFTER_NOON | |||
| BEFORE_NOON | |||
| LAST_HOUR | |||
| LAST_MONTH | |||
| LAST_YEAR | |||
| PAST_HOUR | 26.6.2008 10:07:35 | 26.6.2008 11:07:35 | Current time -60 minutes |
| PAST_DAY | 25.6.2008 11:07:35 | 26.6.2008 11:07:35 | Current time -24 hours |
| PAST_WEEK | 19.6.2008 11:07:35 | 26.6.2008 11:07:35 | Current time -7 days |
| PAST_MONTH | 26.5.2008 11:07:35 | 26.6.2008 11:07:35 | Current time -30 days |
| PAST_YEAR | 26.6.2007 11:07:35 | 26.6.2008 11:07:35 | Current time -365 days |
| THIS_MONTH_LAST_YEAR | |||
| TODAY | Same as LAST_DAY | ||
| TODO_TODAY | 26.6.2008 24:00:00 | ||
| YESTERDAY |
To make corrections or additions to this article, select the edit tab above.
To discuss or ask questions about this article, select the discussion tab above.
To discuss or ask questions about this article, select the discussion tab above.