In AskiaScript, the date-related functions are available.
| Function | Description |
|---|---|
| & : : & time |
Use this tag to delimit a time value, for example: &16:30:00& refers to 4:30:00 PM Note: We recommend that you do not refer to a time value using AM/PM (i.e. h:mm:ss tt or hh:mm:ss tt), because this is dependent on the regional settings of the environment on which the questionnaire is running. For example, &10:00:00 AM&, is valid when running in an environment whose time settings are also set to AM/PM. But this script will not be valid in an environment whose time settings are set to 24 hours (i.e. H:mm:ss and HH:mm:ss formats).
|
| # / / # date |
Use this tag to delimit a date value, for example: #01/01/2004# refers to January 1st 2004. Note: If you refer to a year by its last two digits, Askia will relocate the date according to the end user/server's Windows Regional Options Date settings. In other words, when a two digit year is entered, it will be interpreted as a date between yyyy and yyyy. For example, if the system’s calendar is set between 1900 and 1999, then #01/01/04# refers to January 1st 1904.
|
| Day |
Use this function to retrieve the system's current day as a numerical value. For example: Day(Now) if the day is the 1st of January the function will return 1. Note: by system, we mean the Operating System's Time and Calendar. This depends on the type of fieldwork undertaken. On AskiaVoice, it will be the CCA's operating system. On AskiaWeb. it will be the WebProd Server’s operating system.
|
| EndInterview |
Use this function to retrieve the date and time of when the current interview was ended as a string of characters. This function is used on its own. For example, let’s suppose an interview ended on 1 January 2011, at 2:30 pm: EndInterview will return: 1/1/2011 2:30:00 PM Note: the information returned by this function is automatically saved in the *.QES file (i.e. you can access that data even when the fieldwork is completed). Furthermore, the *.QES file also saves the Date and Time of the start of an interview.
|
| Hour |
Use this function to retrieve the system's current hour as a numerical value. For example: Hour(Now) if the time is the 10:35 p.m. the function will return 10. Note: by system, we mean the Operating System's Time and Calendar. This depends on the type of fieldwork undertaken. On AskiaVoice, it will be CCA's operating system. On AskiaWeb it will be the WebProd Server’s operating system.
|
| IsDate |
Use this function to verify that one or more responses conform to the date format (dd/mm/yy or dd/mm/yyyy). For example: IsDate??Q1?? IsDate(??Day??+"/"+??Month??+"/"+??Year??) |
| Minute |
Use this function to retrieve the system's current minute as a numerical value. For example: Minute(Now) if the time is the 10:35 p.m. the function will return 35. Note: by system, we mean the Operating System's Time and Calendar. This depends on the type of fieldwork undertaken. On AskiaVoice, it will be CCA's operating system. On AskiaWeb it will be the WebProd Server’s operating system.
|
| Month |
Use this function to retrieve the system's current month as a numerical value. For example: Month(Now) if the date is January 1st, the function will return 1. Note: by system, we mean the Operating System's Time and Calendar. This depends on the type of fieldwork undertaken. On AskiaVoice, it will be CCA's operating system. On AskiaWeb it will be the WebProd Server’s operating system.
|
| MonthAsString |
Use this function to retrieve the system's current month as a string of characters, for example: MonthAsString(Now) if the date is January 1st, the function will return January. Note: this function is not multi-lingual, so it will not return a string value according to the languages defined in a multi-lingual questionnaire. The function will systematically return the string values in English.
Note: by system, we mean the Operating System's Time and Calendar. This depends on the type of fieldwork undertaken. On AskiaVoice, it will be CCA's operating system. On AskiaWeb, it will be the WebProd Server’s operating system.
|
| Now |
Use this function to qualify another AskiaScript function, such as: Hour(Now) Day(Now) etc… Furthermore, the function can be used on its own, in which case it will retrieve the system’s current date and time. For example: Now if it is January 1st 2004 and the time is 4:30pm, the function will return 01/01/2004 4:30:00 PM. |
| Second |
Use this function to retrieve the numeric value of seconds based on the system's current time. For example: Second(Now) if the system’s time is 7:58:32 pm, the function will return 32. Note: by system, we mean the Operating System's Time and Calendar. This depends on the type of fieldwork undertaken. On AskiaVoice, it will be CCA's operating system. On AskiaWeb it will be the WebProd Server’s operating system.
|
| StartInterview |
Use this function to retrieve the date and time of when the current interview was started as a string of characters. This function is used on its own. For example, let’s suppose an interview was started on 1 January 2004, at 2:30 pm: StartInterview will return: 1/1/2004 2:30:00 PM Note: the information returned by this function is automatically saved in the *.QES file (i.e. you can access that data even when the fieldwork is completed). Furthermore, the *.QES file also saves the Date and Time of the end of an interview.
|
| WeekDay |
Use this function to retrieve the system's current weekday as a numerical value, from 1 for Monday to 7 for Sunday. For example: WeekDay(Now) if the day is Monday the function will return 1. Note: by system, we mean the Operating System's Time and Calendar. This depends on the type of fieldwork undertaken. On AskiaVoice, it will be CCA's operating system. On AskiaWeb it will be the WebProd Server’s operating system.
|
| WeekDayAsString |
Use this function to retrieve the system's current weekday as a string of characters, for example: WeekDayAsString(Now) if the day is Monday the function will return Monday. Note: this function is not multi-lingual, so it will not return a string value according to the languages defined in a multi-lingual questionnaire. The function will systematically return the string values in English.
Note: by system, we mean the Operating System's Time and Calendar. This depends on the type of fieldwork undertaken. On AskiaVoice, it will be CCA's operating system. On AskiaWeb it will be the WebProd Server’s operating system.
|
| Year |
Use this function to retrieve the system's current year as a numerical value. For example: Year(Now) if the year is 2004 the function will return 2004. Note: by system, we mean the Operating System's Time and Calendar. This depends on the type of fieldwork undertaken. On AskiaVoice, it will be CCA's operating system. On AskiaWeb it will be the WebProd Server’s operating system.
|