{"id":2969,"date":"2020-10-21T12:26:50","date_gmt":"2020-10-21T11:26:50","guid":{"rendered":"https:\/\/www.snapsurveys.com\/support-snapxmp\/?post_type=epkb_post_type_1&#038;p=2969"},"modified":"2023-02-28T11:16:58","modified_gmt":"2023-02-28T11:16:58","slug":"analysing-date-responses","status":"publish","type":"epkb_post_type_1","link":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-date-responses\/","title":{"rendered":"Analysing date responses"},"content":{"rendered":"\n<p>   Dates are analysed in a number of ways as follows: <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>     Dates are categorised as falling in particular years, months or weeks of the year, or on particular days of the week.   <\/li>\n\n\n\n<li>\n    The difference between two dates can be calculated, such as calculating a respondent\u2019s age. These can be categorised or grouped into appropriate ranges or used in the production of descriptive statistics.\n  <\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Date formats<\/h2>\n\n\n\n<p>   The software supports a wide range of date formats. All dates are based on the Gregorian calendar.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Day<\/h3>\n\n\n\n<p>The day number must appear in the range 1 to 31, with optional leading zeros. For example, 01, 02 are acceptable. Checks are made on the validity of a day number for the given month. For example, 31 September will be invalid. In the case of the month of February, the calculations also check whether the year is a leap year.<\/p>\n\n\n\n<p>The day number can appear before or after the month, e.g. 1 Jan or Jan 1.<\/p>\n\n\n\n<p>You cannot use the day suffixes such st, nd, rd, th, unless you apply a suitable date pattern to the variable.<\/p>\n\n\n\n<p>The system settings determine the local rules for dates, such as the US standard of Month\/Day\/Year. Consequently, 01\/05\/97 will be calculated as January 5th 1997 in the US and May 1st 1997 in the UK (the computer date settings control these formats).<\/p>\n\n\n\n<p>The characters, full stop (.), a hyphen (-) or a slash (\/) separate the month, day and year. A space is used when the month is a word.<\/p>\n\n\n\n<p>In the special case where the month name is given before the day number, a comma can be used to separate the day and year, e.g. January 5,1997<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Month<\/h3>\n\n\n\n<p>The month can appear in full, e.g. January, or abbreviated to the first 3 characters, e.g. Jan, or as a number, e.g. 01.<\/p>\n\n\n\n<p>The only exceptions to the 3 character abbreviation rule are July which can be Jul or Jly, and September which can be Sep or Sept.<\/p>\n\n\n\n<p>The characters, full stop (.), a hyphen (-) or a slash (\/) separate the month, day and year. The space character separates the month from the rest of the date if it is in word format.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Year<\/h3>\n\n\n\n<p>The year number has two formats available, either the last two digits, e.g. 97, or the full year, e.g. 1997. The characters, full stop (.), a hyphen (-) or a slash (\/) separate the month, day and year.<\/p>\n\n\n\n<p>When a year has only two digits, the default sets the year between 1930 and 2029 inclusive. In this way, 97 represents the year 1997, 00 represents 2000, and 29 represents 2029. Update the default year range by opening the <strong>Data Entry Tailoring<\/strong> dialog, using the <strong>Tailoring | Data Entry<\/strong> menu item. The Dates section contains the Date format and 2 Digit Years fields, which sets the default year range.  <\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2023\/02\/DEntryTailor1.png\" alt=\"\" class=\"wp-image-8689\" width=\"431\" height=\"388\" srcset=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2023\/02\/DEntryTailor1.png 431w, https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2023\/02\/DEntryTailor1-300x270.png 300w\" sizes=\"(max-width: 431px) 100vw, 431px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><a id=\"post-2969-_Toc35499230\"><\/a>Date functions<\/h2>\n\n\n\n<p>   When defining dates, there are a number of functions that can perform calculations and tests on the dates. The function names are not case sensitive and can be written in uppercase or mixed case. <\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><p>\n  Function\n<\/p><\/td><td><p>   Description<\/p><\/td><\/tr><tr><td><p><strong>year<\/strong>\n<\/p><\/td><td><p>\n  Gives the year in which the date occurs. Note that the result is always the year in full, that is, even though the date was recorded as being in 06, the year function returns 2006.\n<\/p><\/td><\/tr><tr><td><p><strong>month<\/strong>\n<\/p><\/td><td><p>\n  Gives the month number in which the date occurs.\n<\/p><\/td><\/tr><tr><td><p><strong>month name<\/strong>\n<\/p><\/td><td><p>\n  Gives the name of the month in which the date occurs.\n<\/p><\/td><\/tr><tr><td><p><strong>day<\/strong>\n<\/p><\/td><td><p>\n  Gives the day of the month in which the date occurs.\n<\/p><\/td><\/tr><tr><td><p><strong>weekday<\/strong>\n<\/p><\/td><td><p>\n  Gives the day of the week on which the date occurs.\n<\/p><p>\n  Monday is weekday 1 and Sunday is weekday 7. Dates which fall on the weekend are those where weekday is greater than 5, similarly, dates which fall in the week are those where weekday is less than 6.\n<\/p><\/td><\/tr><tr><td><p><strong>weekday name<\/strong>\n<\/p><\/td><td><p>\n  Gives the name of the day of the week on which the date occurs.\n<\/p><\/td><\/tr><tr><td><p><strong>today<\/strong>\n<\/p><\/td><td><p>   Used as a variable, returning the current date as set on the computer. <\/p><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Examples<\/h2>\n\n\n\n<p>Date functions are useful in filter expressions to return a group of data responses based on a date, for example all responses completed in a particular month or year. Filters are available in analyses, reports and when looking at responses in the data entry window.<\/p>\n\n\n\n<p>Here are some examples of date filters using the date functions:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>ID.Date year=2023 <\/strong>gives responses for everyone who responded in 2023<\/li>\n\n\n\n<li><strong>ID.Date year=Today year <\/strong>gives responses completed this year<\/li>\n\n\n\n<li><strong>VisitDate Month\u00a0= Today Month<\/strong> gives responses where respondents visited this month. <\/li>\n\n\n\n<li><strong>VisitDate Month\u00a0= Today Month AND VisitDate Year = Today Year<\/strong> returns responses where respondents visited this month in the current year, which you can use if your survey runs over a number of years <\/li>\n\n\n\n<li><strong>VisitDate Month\u00a0= 1<\/strong> gives responses where respondents visited in January<\/li>\n\n\n\n<li><strong>VisitDate Month name\u00a0= &#8220;January&#8221;<\/strong> also gives responses where respondents visited in January<\/li>\n\n\n\n<li><strong>VisitDate day = 1<\/strong> gives responses where respondents visited on the first day of the month<\/li>\n\n\n\n<li><strong>VisitDate weekday = 1<\/strong> gives responses where respondents visited on Monday<\/li>\n\n\n\n<li><strong>VisitDate weekday name = &#8220;Monday&#8221;<\/strong> is an alternative filter that also gives responses where respondents visited on Monday<\/li>\n\n\n\n<li><strong>ID.Date weekday = (1 TO 5)<\/strong> gives responses completed on a weekday from Monday to Friday<\/li>\n\n\n\n<li><strong>ID.Date weekday = (6 TO 7)<\/strong> gives responses completed on a weekend from Saturday to Sunday<\/li>\n\n\n\n<li><strong>ID.Date weekday > 6 <\/strong>is an alternative filter which also gives responses completed on a weekend<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Dates are analysed in a number of ways as follows: Date formats The software supports a wide range of date formats. All dates are based on the Gregorian calendar. Day The day number must appear in the range 1 to 31, with optional leading zeros. For example, 01, 02 are acceptable. Checks are made on [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"epkb_post_type_1_category":[66],"epkb_post_type_1_tag":[],"class_list":["post-2969","epkb_post_type_1","type-epkb_post_type_1","status-publish","hentry","epkb_post_type_1_category-analysing-open-ended"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Analysing date responses | SnapSurveys<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-date-responses\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Analysing date responses | SnapSurveys\" \/>\n<meta property=\"og:description\" content=\"Dates are analysed in a number of ways as follows: Date formats The software supports a wide range of date formats. All dates are based on the Gregorian calendar. Day The day number must appear in the range 1 to 31, with optional leading zeros. For example, 01, 02 are acceptable. Checks are made on [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-date-responses\/\" \/>\n<meta property=\"og:site_name\" content=\"SnapSurveys\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/snapsurveys\" \/>\n<meta property=\"article:modified_time\" content=\"2023-02-28T11:16:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2023\/02\/DEntryTailor1.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@snapsurveys\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-date-responses\/\",\"url\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-date-responses\/\",\"name\":\"Analysing date responses | SnapSurveys\",\"isPartOf\":{\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-date-responses\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-date-responses\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2023\/02\/DEntryTailor1.png\",\"datePublished\":\"2020-10-21T11:26:50+00:00\",\"dateModified\":\"2023-02-28T11:16:58+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-date-responses\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-date-responses\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-date-responses\/#primaryimage\",\"url\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2023\/02\/DEntryTailor1.png\",\"contentUrl\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2023\/02\/DEntryTailor1.png\",\"width\":431,\"height\":388},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-date-responses\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Snap XMP Support\",\"item\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp-archive\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Analysing date responses\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/#website\",\"url\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/\",\"name\":\"Snap XMP Support Hub\",\"description\":\"Support documentation for Snap Surveys products\",\"publisher\":{\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/#organization\",\"name\":\"Snap Surveys\",\"url\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/06\/snap-surveys-logo-fc.svg\",\"contentUrl\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/06\/snap-surveys-logo-fc.svg\",\"width\":867,\"height\":159,\"caption\":\"Snap Surveys\"},\"image\":{\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/snapsurveys\",\"https:\/\/x.com\/snapsurveys\",\"https:\/\/www.linkedin.com\/company\/snapsurveys\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Analysing date responses | SnapSurveys","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-date-responses\/","og_locale":"en_GB","og_type":"article","og_title":"Analysing date responses | SnapSurveys","og_description":"Dates are analysed in a number of ways as follows: Date formats The software supports a wide range of date formats. All dates are based on the Gregorian calendar. Day The day number must appear in the range 1 to 31, with optional leading zeros. For example, 01, 02 are acceptable. Checks are made on [&hellip;]","og_url":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-date-responses\/","og_site_name":"SnapSurveys","article_publisher":"https:\/\/www.facebook.com\/snapsurveys","article_modified_time":"2023-02-28T11:16:58+00:00","og_image":[{"url":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2023\/02\/DEntryTailor1.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_site":"@snapsurveys","twitter_misc":{"Estimated reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-date-responses\/","url":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-date-responses\/","name":"Analysing date responses | SnapSurveys","isPartOf":{"@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-date-responses\/#primaryimage"},"image":{"@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-date-responses\/#primaryimage"},"thumbnailUrl":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2023\/02\/DEntryTailor1.png","datePublished":"2020-10-21T11:26:50+00:00","dateModified":"2023-02-28T11:16:58+00:00","breadcrumb":{"@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-date-responses\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-date-responses\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-date-responses\/#primaryimage","url":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2023\/02\/DEntryTailor1.png","contentUrl":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2023\/02\/DEntryTailor1.png","width":431,"height":388},{"@type":"BreadcrumbList","@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-date-responses\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.snapsurveys.com\/support-snapxmp\/"},{"@type":"ListItem","position":2,"name":"Snap XMP Support","item":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp-archive\/"},{"@type":"ListItem","position":3,"name":"Analysing date responses"}]},{"@type":"WebSite","@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/#website","url":"https:\/\/www.snapsurveys.com\/support-snapxmp\/","name":"Snap XMP Support Hub","description":"Support documentation for Snap Surveys products","publisher":{"@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.snapsurveys.com\/support-snapxmp\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/#organization","name":"Snap Surveys","url":"https:\/\/www.snapsurveys.com\/support-snapxmp\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/#\/schema\/logo\/image\/","url":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/06\/snap-surveys-logo-fc.svg","contentUrl":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/06\/snap-surveys-logo-fc.svg","width":867,"height":159,"caption":"Snap Surveys"},"image":{"@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/snapsurveys","https:\/\/x.com\/snapsurveys","https:\/\/www.linkedin.com\/company\/snapsurveys"]}]}},"_links":{"self":[{"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/epkb_post_type_1\/2969","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/epkb_post_type_1"}],"about":[{"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/types\/epkb_post_type_1"}],"author":[{"embeddable":true,"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/comments?post=2969"}],"version-history":[{"count":7,"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/epkb_post_type_1\/2969\/revisions"}],"predecessor-version":[{"id":8908,"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/epkb_post_type_1\/2969\/revisions\/8908"}],"wp:attachment":[{"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/media?parent=2969"}],"wp:term":[{"taxonomy":"epkb_post_type_1_category","embeddable":true,"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/epkb_post_type_1_category?post=2969"},{"taxonomy":"epkb_post_type_1_tag","embeddable":true,"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/epkb_post_type_1_tag?post=2969"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}