{"id":4834,"date":"2021-05-10T11:43:22","date_gmt":"2021-05-10T10:43:22","guid":{"rendered":"https:\/\/www.snapsurveys.com\/support-snapxmp\/?post_type=epkb_post_type_1&#038;p=4834"},"modified":"2023-10-10T15:08:03","modified_gmt":"2023-10-10T14:08:03","slug":"analysing-dates","status":"publish","type":"epkb_post_type_1","link":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-dates\/","title":{"rendered":"Analysing dates"},"content":{"rendered":"\n<p>   Snap XMP Desktop includes a number of operations and functions specifically designed to help analyse dates. <\/p>\n\n\n\n<p>\n  When a participant responds to a date response question they can enter a free format date. Examples of the date can include July 1st, 2020 or 1 Jul 20. The inbuilt operations enable date responses to be categorized by month, by day of the week or by custom specified ranges.\n<\/p>\n\n\n\n<p>\n  The following steps show how to create a derived variable which categorizes the response, to a date question, into quarters of the year.\n<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><a id=\"post-4834-_Step_1:_Create\"><\/a>Step 1: Create the derived variable<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\n  Open the <strong>Variables<\/strong> window&nbsp;\n  <img decoding=\"async\" width=\"26\" height=\"26\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2021\/05\/variablesicon-png-1.png\" class=\"wp-image-4835\" alt=\"VariablesIcon.png\">\n   and click&nbsp;\n  <img decoding=\"async\" width=\"25\" height=\"26\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2021\/05\/newicon-png-1.png\" class=\"wp-image-4836\" alt=\"NewIcon.png\">\n  &nbsp;to add a new variable.\n<\/li>\n\n\n\n<li>\n  In <strong>Name<\/strong> enter Quarter as the derived variable name.\n<\/li>\n\n\n\n<li>\n  Set the <strong>Type<\/strong> to Derived and <strong>Response<\/strong> to Single.\n  <br>\n  <img fetchpriority=\"high\" decoding=\"async\" width=\"552\" height=\"142\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2021\/05\/createderivedvariable-png.png\" class=\"wp-image-4837\" alt=\"CreateDerivedVariable.PNG\" srcset=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2021\/05\/createderivedvariable-png.png 552w, https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2021\/05\/createderivedvariable-png-300x77.png 300w\" sizes=\"(max-width: 552px) 100vw, 552px\" \/>\n<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><a id=\"post-4834-_Step_2:_Enter\"><\/a>Step 2: Enter the date ranges<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\n  In the Code list grid, enter Quarter 1 as the <strong>Label<\/strong> for the first quarter then in <strong>Values<\/strong> enter the date range Q1 &gt;= 1 Jan 20 and Q1 &lt; 1 Apr 20. Any appropriate date format can be used to specify the fixed dates.\n<\/li>\n\n\n\n<li>\n  Repeat this for the other quarter date ranges.\n<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"549\" height=\"234\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2021\/05\/fixeddateranges-png.png\" alt=\"Code list defining the annual quarters\" class=\"wp-image-4838\" srcset=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2021\/05\/fixeddateranges-png.png 549w, https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2021\/05\/fixeddateranges-png-300x128.png 300w\" sizes=\"(max-width: 549px) 100vw, 549px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\">\n<li>\n  Alternatively, for this example we can use the <strong>MONTH<\/strong> function. This gives a number representing the month of the year (1=January, 12=December). Using that, we can set up the codes of the categorizing variable as follows:\n<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"548\" height=\"236\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2021\/05\/daterangesusingmonth-png.png\" alt=\"Code list defining the annual quarters\" class=\"wp-image-4839\" srcset=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2021\/05\/daterangesusingmonth-png.png 548w, https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2021\/05\/daterangesusingmonth-png-300x129.png 300w\" sizes=\"(max-width: 548px) 100vw, 548px\" \/><\/figure>\n\n\n\n<p>\n  Using the <strong>MONTH<\/strong> function here produces a derived variable that works for every year. This method also takes advantage of the fact that for a <strong>derived single<\/strong> variable, only the upper bound for each code value needs to be specified so that any respondent in the previous code will already have been captured by that code. \n<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><a id=\"post-4834-_Step_3:_Using\"><\/a>Step 3: Using other built-in date functions<\/h2>\n\n\n\n<p>\n  Other built-in functions that may be used for extracting information from dates are shown in the table.\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><p><strong>weekday<\/strong> \n<\/p><\/td><td><p>\n  the day of the week 1=Monday, 7=Sunday<strong> <\/strong>\n<\/p><\/td><\/tr><tr><td><p><strong>weekday name<\/strong>\n<\/p><\/td><td><p>\n  a literal representing the name of the weekday, for example, \u201cWednesday\u201d\n<\/p><\/td><\/tr><tr><td><p><strong>day<\/strong>\n<\/p><\/td><td><p>\n  the day of the month 1 to 28, 29, 30 or 31 as appropriate\n<\/p><\/td><\/tr><tr><td><p><strong>month<\/strong>\n<\/p><\/td><td><p>\n  the month of the year 1=January, 12=December\n<\/p><\/td><\/tr><tr><td><p><strong>month name<\/strong>\n<\/p><\/td><td><p>\n  the name of the month, for example, \u201cJuly\u201d\n<\/p><\/td><\/tr><tr><td><p><strong>year<\/strong>\n<\/p><\/td><td><p>\n  the four-digit year, for example, 2020\n<\/p><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\n  You can build a similar derived variable to categorize replies according to the day of week, regardless of the month or the year, by using the weekday function in a similar way to the way the month function was used in the previous example.\n<\/p>\n\n\n\n<p>\n  If there is a topic you would like a worksheet on, email to <a href=\"mailto:snapideas@snapsurveys.com\" target=\"_self\" rel=\"noopener noreferrer\">snapideas@snapsurveys.com<\/a>\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Snap XMP Desktop includes a number of operations and functions specifically designed to help analyse dates. When a participant responds to a date response question they can enter a free format date. Examples of the date can include July 1st, 2020 or 1 Jul 20. The inbuilt operations enable date responses to be categorized by [&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":[94],"epkb_post_type_1_tag":[],"class_list":["post-4834","epkb_post_type_1","type-epkb_post_type_1","status-publish","hentry","epkb_post_type_1_category-how-to-tutorials-snap-desktop-analyze"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Analysing dates | 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-dates\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Analysing dates | SnapSurveys\" \/>\n<meta property=\"og:description\" content=\"Snap XMP Desktop includes a number of operations and functions specifically designed to help analyse dates. When a participant responds to a date response question they can enter a free format date. Examples of the date can include July 1st, 2020 or 1 Jul 20. The inbuilt operations enable date responses to be categorized by [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-dates\/\" \/>\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-10-10T14:08:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2021\/05\/variablesicon-png-1.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=\"3 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-dates\/\",\"url\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-dates\/\",\"name\":\"Analysing dates | SnapSurveys\",\"isPartOf\":{\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-dates\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-dates\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2021\/05\/variablesicon-png-1.png\",\"datePublished\":\"2021-05-10T10:43:22+00:00\",\"dateModified\":\"2023-10-10T14:08:03+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-dates\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-dates\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-dates\/#primaryimage\",\"url\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2021\/05\/variablesicon-png-1.png\",\"contentUrl\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2021\/05\/variablesicon-png-1.png\",\"width\":26,\"height\":26},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-dates\/#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 dates\"}]},{\"@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 dates | 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-dates\/","og_locale":"en_GB","og_type":"article","og_title":"Analysing dates | SnapSurveys","og_description":"Snap XMP Desktop includes a number of operations and functions specifically designed to help analyse dates. When a participant responds to a date response question they can enter a free format date. Examples of the date can include July 1st, 2020 or 1 Jul 20. The inbuilt operations enable date responses to be categorized by [&hellip;]","og_url":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-dates\/","og_site_name":"SnapSurveys","article_publisher":"https:\/\/www.facebook.com\/snapsurveys","article_modified_time":"2023-10-10T14:08:03+00:00","og_image":[{"url":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2021\/05\/variablesicon-png-1.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_site":"@snapsurveys","twitter_misc":{"Estimated reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-dates\/","url":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-dates\/","name":"Analysing dates | SnapSurveys","isPartOf":{"@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-dates\/#primaryimage"},"image":{"@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-dates\/#primaryimage"},"thumbnailUrl":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2021\/05\/variablesicon-png-1.png","datePublished":"2021-05-10T10:43:22+00:00","dateModified":"2023-10-10T14:08:03+00:00","breadcrumb":{"@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-dates\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-dates\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-dates\/#primaryimage","url":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2021\/05\/variablesicon-png-1.png","contentUrl":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2021\/05\/variablesicon-png-1.png","width":26,"height":26},{"@type":"BreadcrumbList","@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/analysing-dates\/#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 dates"}]},{"@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\/4834","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=4834"}],"version-history":[{"count":4,"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/epkb_post_type_1\/4834\/revisions"}],"predecessor-version":[{"id":10365,"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/epkb_post_type_1\/4834\/revisions\/10365"}],"wp:attachment":[{"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/media?parent=4834"}],"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=4834"},{"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=4834"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}