<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: %SYSFUNC format problem in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SYSFUNC-format-problem/m-p/83308#M17962</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, you have reasonably complex code, but haven't really told us what it means when you say it "doesn't work any more".&amp;nbsp; So here's a wild guess.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The YYMMD formats really only require 7 characters, such as 2012-06.&amp;nbsp; So by specifying YYMMD9, you are adding a couple of leading blanks to the result.&amp;nbsp; Could that cause a problem?&amp;nbsp; Would it help to switch to YYMMD7 instead of YYMMD9?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Jun 2012 16:08:58 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2012-06-14T16:08:58Z</dc:date>
    <item>
      <title>%SYSFUNC format problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SYSFUNC-format-problem/m-p/83307#M17961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: #808080; font-size: 10pt; mso-fareast-language: DE;"&gt;Hi! &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: #808080; font-size: 10pt; mso-fareast-language: DE;"&gt;I am using the following macro within a proc format to generate a format. It is working perfectly. However, if I replace the format DDMMYYP10. by YYMMD9. it suddenly does not work anymore. How can I fix it?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: #808080; font-size: 10pt; mso-fareast-language: DE;"&gt;&amp;amp;Stichdatum is a date, f.e. 31May2012&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: #808080; font-size: 10pt; mso-fareast-language: DE;"&gt;Thx, Stefan&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: green; font-size: 10pt; mso-fareast-language: DE;"&gt;--------------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: green; font-size: 10pt; mso-fareast-language: DE;"&gt;/* Dynamische Generierung der Intervallgrenzen */&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;STRONG style="mso-fareast-language: DE; color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;%Macro&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt; genInt();&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;&lt;SPAN style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;value faellig &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;&lt;SPAN style="mso-tab-count: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;low - &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE;"&gt;%SYSFUNC&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;(Intnx(Month, &amp;amp;Stichdatum, &lt;/SPAN&gt;&lt;STRONG style="mso-fareast-language: DE; color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;, e)) = &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 10pt; mso-fareast-language: DE;"&gt;'0_abgelaufen'&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="mso-fareast-language: DE; color: black; background: white; font-size: 10pt; font-family: 'Courier New'; mso-tab-count: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;%put&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt; Stichdatum=&amp;amp;stichdatum;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="mso-fareast-language: DE; color: black; background: white; font-size: 10pt; mso-ansi-language: EN-GB; font-family: 'Courier New'; mso-tab-count: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;%LET&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt; dvar = &amp;amp;stichdatum;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="mso-fareast-language: DE; color: black; background: white; font-size: 10pt; mso-ansi-language: EN-GB; font-family: 'Courier New'; mso-tab-count: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;%LET&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt; hvar = &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;%SYSFUNC&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;(Intnx(month, &amp;amp;dvar, 1, e));&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="mso-fareast-language: DE; color: black; background: white; font-size: 10pt; mso-ansi-language: EN-GB; font-family: 'Courier New'; mso-tab-count: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: green; font-size: 10pt; mso-fareast-language: DE;"&gt;/* Falls Monatsende nicht mit Quartalsende zusammenfällt */&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="mso-fareast-language: DE; color: black; background: white; font-size: 10pt; font-family: 'Courier New'; mso-tab-count: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;%IF&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt; &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;(intnx(month,&amp;amp;dvar,&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: teal; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;0&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;,e)) &amp;lt; &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;(intnx(qtr,&amp;amp;dvar,&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: teal; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;0&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;,e))&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="mso-fareast-language: DE; color: black; background: white; font-size: 10pt; mso-ansi-language: EN-GB; font-family: 'Courier New'; mso-tab-count: 3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;%THEN&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="mso-fareast-language: DE; color: black; background: white; font-size: 10pt; mso-ansi-language: EN-GB; font-family: 'Courier New'; mso-tab-count: 4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;%DO&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="mso-fareast-language: DE; color: black; background: white; font-size: 10pt; mso-ansi-language: EN-GB; font-family: 'Courier New'; mso-tab-count: 5;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;%SYSFUNC&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;(Intnx(Month, &amp;amp;dvar, &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: teal; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;1&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;, b)) - &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;%SYSFUNC&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;(Intnx(Qtr, &amp;amp;dvar, &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: teal; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;0&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;, e)) = &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;%SYSFUNC&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;(Intnx(qtr, &amp;amp;dvar, &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: teal; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;0&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;, end), &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: teal; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;DDMMYYP10.&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="mso-fareast-language: DE; color: black; background: white; font-size: 10pt; mso-ansi-language: EN-GB; font-family: 'Courier New'; mso-tab-count: 4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE;"&gt;%END&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="mso-fareast-language: DE; color: black; background: white; font-size: 10pt; font-family: 'Courier New'; mso-tab-count: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE;"&gt;%LET&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt; dvar = &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE;"&gt;%SYSFUNC&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;(Intnx(qtr, &amp;amp;dvar, 1, b)); &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: green; font-size: 10pt; mso-fareast-language: DE;"&gt;/* nächstes Quartal */&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="mso-fareast-language: DE; color: black; background: white; font-size: 10pt; font-family: 'Courier New'; mso-tab-count: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: green; font-size: 10pt; mso-fareast-language: DE;"&gt;/* Quartalsscheiben erzeugen */&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="mso-fareast-language: DE; color: black; background: white; font-size: 10pt; font-family: 'Courier New'; mso-tab-count: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;%DO&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt; &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;%UNTIL&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt; (&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;%SYSFUNC&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;(Intnx(Qtr, &amp;amp;dvar, &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: teal; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;0&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;, e)) &amp;gt; &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;%SYSFUNC&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;(Intnx(year, &amp;amp;hvar, &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: teal; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;1&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;, e)));&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="mso-fareast-language: DE; color: black; background: white; font-size: 10pt; mso-ansi-language: EN-GB; font-family: 'Courier New'; mso-tab-count: 3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;%SYSFUNC&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;(Intnx(qtr, &amp;amp;dvar, &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: teal; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;0&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;, b)) - &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;%SYSFUNC&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;(Intnx(Qtr, &amp;amp;dvar, &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: teal; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;0&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;, e)) = &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;%SYSFUNC&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;(Intnx(qtr, &amp;amp;dvar, &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: teal; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;0&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;, end), &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: teal; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;DDMMYYP10.&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="mso-fareast-language: DE; color: black; background: white; font-size: 10pt; mso-ansi-language: EN-GB; font-family: 'Courier New'; mso-tab-count: 3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE;"&gt;%LET&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt; dvar = &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE;"&gt;%SYSFUNC&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;(Intnx(qtr, &amp;amp;dvar, 1, b)); &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: green; font-size: 10pt; mso-fareast-language: DE;"&gt;/* nächstes Quartal */&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="mso-fareast-language: DE; color: black; background: white; font-size: 10pt; font-family: 'Courier New'; mso-tab-count: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE;"&gt;%END&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="mso-fareast-language: DE; color: black; background: white; font-size: 10pt; font-family: 'Courier New'; mso-tab-count: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: green; font-size: 10pt; mso-fareast-language: DE;"&gt;/* Halbjahresscheiben erzeugen */&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="mso-fareast-language: DE; color: black; background: white; font-size: 10pt; font-family: 'Courier New'; mso-tab-count: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE;"&gt;%DO&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE;"&gt;%UNTIL&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE;"&gt;%SYSFUNC&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;(Intnx(semiyear, &amp;amp;dvar, &lt;/SPAN&gt;&lt;STRONG style="mso-fareast-language: DE; color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;, e)) &amp;gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE;"&gt;%SYSFUNC&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;(Intnx(year, &amp;amp;hvar, &lt;/SPAN&gt;&lt;STRONG style="mso-fareast-language: DE; color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;2&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;, e)));&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="mso-fareast-language: DE; color: black; background: white; font-size: 10pt; font-family: 'Courier New'; mso-tab-count: 3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE;"&gt;%SYSFUNC&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;(Intnx(semiyear, &amp;amp;dvar, &lt;/SPAN&gt;&lt;STRONG style="mso-fareast-language: DE; color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;, b)) - &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE;"&gt;%SYSFUNC&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;(Intnx(semiyear, &amp;amp;dvar, &lt;/SPAN&gt;&lt;STRONG style="mso-fareast-language: DE; color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;, e)) = &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE;"&gt;%SYSFUNC&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;(Intnx(semiyear, &amp;amp;dvar, &lt;/SPAN&gt;&lt;STRONG style="mso-fareast-language: DE; color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;, end), &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: teal; font-size: 10pt; mso-fareast-language: DE;"&gt;DDMMYYP10.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="mso-fareast-language: DE; color: black; background: white; font-size: 10pt; font-family: 'Courier New'; mso-tab-count: 3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE;"&gt;%LET&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt; dvar = &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE;"&gt;%SYSFUNC&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;(Intnx(semiyear, &amp;amp;dvar, 1, b)); &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: green; font-size: 10pt; mso-fareast-language: DE;"&gt;/* nächstes Halbjahr */&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="mso-fareast-language: DE; color: black; background: white; font-size: 10pt; font-family: 'Courier New'; mso-tab-count: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE;"&gt;%END&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="mso-fareast-language: DE; color: black; background: white; font-size: 10pt; font-family: 'Courier New'; mso-tab-count: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: green; font-size: 10pt; mso-fareast-language: DE;"&gt;/* Jahresscheiben erzeugen */&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="mso-fareast-language: DE; color: black; background: white; font-size: 10pt; font-family: 'Courier New'; mso-tab-count: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE;"&gt;%DO&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE;"&gt;%UNTIL&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE;"&gt;%SYSFUNC&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;(Intnx(year, &amp;amp;dvar, &lt;/SPAN&gt;&lt;STRONG style="mso-fareast-language: DE; color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;, e)) &amp;gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE;"&gt;%SYSFUNC&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;(Intnx(year, &amp;amp;hvar, &lt;/SPAN&gt;&lt;STRONG style="mso-fareast-language: DE; color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;6&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;, e)));&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="mso-fareast-language: DE; color: black; background: white; font-size: 10pt; font-family: 'Courier New'; mso-tab-count: 3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;%SYSFUNC&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;(Intnx(year, &amp;amp;dvar, &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: teal; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;0&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;, b)) - &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;%SYSFUNC&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;(Intnx(year, &amp;amp;dvar, &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: teal; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;0&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;, e)) = &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;%SYSFUNC&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;(Intnx(year, &amp;amp;dvar, &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: teal; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;0&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;, end), &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: teal; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;YEAR4.&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="mso-fareast-language: DE; color: black; background: white; font-size: 10pt; mso-ansi-language: EN-GB; font-family: 'Courier New'; mso-tab-count: 3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE;"&gt;%LET&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt; dvar = &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE;"&gt;%SYSFUNC&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;(Intnx(year, &amp;amp;dvar, 1, b)); &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: green; font-size: 10pt; mso-fareast-language: DE;"&gt;/* nächstes Halbjahr */&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="mso-fareast-language: DE; color: black; background: white; font-size: 10pt; font-family: 'Courier New'; mso-tab-count: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE;"&gt;%END&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="mso-fareast-language: DE; color: black; background: white; font-size: 10pt; font-family: 'Courier New'; mso-tab-count: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: green; font-size: 10pt; mso-fareast-language: DE;"&gt;/* Restscheibe erzeugen */&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="mso-fareast-language: DE; color: black; background: white; font-size: 10pt; font-family: 'Courier New'; mso-tab-count: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE;"&gt;%SYSFUNC&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;(Intnx(year, &amp;amp;dvar, &lt;/SPAN&gt;&lt;STRONG style="mso-fareast-language: DE; color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;, b)) - high = &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE;"&gt;%SYSFUNC&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;(Catx(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE;"&gt;%str&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;( ),nach ,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE;"&gt;%SYSFUNC&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;(Intnx(year, &amp;amp;dvar, -&lt;/SPAN&gt;&lt;STRONG style="mso-fareast-language: DE; color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;, e), &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: teal; font-size: 10pt; mso-fareast-language: DE;"&gt;YEAR4.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;)))&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;&lt;SPAN style="mso-tab-count: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;STRONG style="mso-fareast-language: DE; color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;%mend&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt; genInt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="font-family: LBBWLucida Sans; color: #000000; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2012 15:23:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SYSFUNC-format-problem/m-p/83307#M17961</guid>
      <dc:creator>sfmeier</dc:creator>
      <dc:date>2012-06-14T15:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: %SYSFUNC format problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SYSFUNC-format-problem/m-p/83308#M17962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, you have reasonably complex code, but haven't really told us what it means when you say it "doesn't work any more".&amp;nbsp; So here's a wild guess.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The YYMMD formats really only require 7 characters, such as 2012-06.&amp;nbsp; So by specifying YYMMD9, you are adding a couple of leading blanks to the result.&amp;nbsp; Could that cause a problem?&amp;nbsp; Would it help to switch to YYMMD7 instead of YYMMD9?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2012 16:08:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SYSFUNC-format-problem/m-p/83308#M17962</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-06-14T16:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: %SYSFUNC format problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SYSFUNC-format-problem/m-p/83309#M17963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I run your code with MPRINT turned on, it shows this generated Value statement --&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; value faellig low - 19144 = '0_abgelaufen' 19145 - 19174 = 30.06.2012 19175 - 19266 = 30.09.2012 19267 -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;19358 = 31.12.2012 19359 - 19448 = 31.03.2013 19449 - 19539 = 30.06.2013 19540 - 19631 = 30.09.2013 19632 - 19723 = 31.12.2013&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;19724 - 19904 = 30.06.2014 19905 - 20088 = 31.12.2014 20089 - 20453 = 2015 20454 - 20819 = 2016 20820 - 21184 = 2017 21185 -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;21549 = 2018 21550 - high = nach 2018 ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this is working because the formatted date such as 30.06.2012&amp;nbsp; is interpreted as a decimal(?), but the last value nach 2018 is clearly a character so I'm not sure about this explanation.&amp;nbsp; But the format YYMMD9 returns a value with a dash in it, such as 2012-06, so it is obviously a character.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The solution I found is to put quote marks around the formatted value assignment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #c00000; font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;= "%SYSFUNC(Intnx(qtr, &amp;amp;dvar, 0, end), YYMMD9.)"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the value statement then returns this--&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; value faellig low - 19144 = '0_abgelaufen' 19145 - 19174 = " 2012-06" 19175 - 19266 = " 2012-09" 19267 -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;19358 = " 2012-12" 19359 - 19448 = " 2013-03" 19449 - 19539 = " 2013-06" 19540 - 19631 = " 2013-09" 19632 - 19723 = "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2013-12" 19724 - 19904 = " 2014-06" 19905 - 20088 = " 2014-12" 20089 - 20453 = "2015" 20454 - 20819 = "2016" 20820 - 21184 =&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"2017" 21185 - 21549 = "2018" 21550 - high = "nach 2018" ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please test it and let us know if it solves the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2012 16:25:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SYSFUNC-format-problem/m-p/83309#M17963</guid>
      <dc:creator>bentleyj1</dc:creator>
      <dc:date>2012-06-14T16:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: %SYSFUNC format problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SYSFUNC-format-problem/m-p/83310#M17964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Steffan,&lt;/P&gt;&lt;P&gt;Can you explain what you want ?&lt;/P&gt;&lt;P&gt;As to your code, It is not look good. I think you can first make a dataset to hold these date range and make such FORMAT .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;About your question, I notice a problem ,You should use quote around the label you make ,since it is character label.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; %SYSFUNC(Intnx(semiyear, &amp;amp;dvar, 0, end), DDMMYYP10.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---------&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; " %SYSFUNC(Intnx(semiyear, &amp;amp;dvar, 0, end), DDMMYYP10.) "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; %SYSFUNC(Intnx(qtr, &amp;amp;dvar, 0, end), DDMMYYP10.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;------&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;" %SYSFUNC(Intnx(qtr, &amp;amp;dvar, 0, end), DDMMYYP10.) "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;..... and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2012 02:37:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SYSFUNC-format-problem/m-p/83310#M17964</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-06-15T02:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: %SYSFUNC format problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SYSFUNC-format-problem/m-p/83311#M17965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ksharp,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for your answer, I would love to make my code to look better!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to create a date format that depends on the report date (which the user can specify). Two format "components" should depend on the report date:&lt;/P&gt;&lt;P&gt;The range and number of the "categories" and the "label", i.e.&lt;/P&gt;&lt;P&gt;01.07.12-30.09.12 = 2012-09&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd to have a macro to create a table and then read the table in proc format. However I have no idea how to read a table into a proc format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2012 07:21:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SYSFUNC-format-problem/m-p/83311#M17965</guid>
      <dc:creator>sfmeier</dc:creator>
      <dc:date>2012-06-15T07:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: %SYSFUNC format problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SYSFUNC-format-problem/m-p/83312#M17966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What you are doing in above code can be programmed in a data step.&lt;/P&gt;&lt;P&gt;Put character arguments of INTNX function in quotes and reference variables by their name in data step instead of macro variable names.&lt;/P&gt;&lt;P&gt;e.g:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Intnx(month, &amp;amp;dvar, 1, e) vs Intnx('month', dvar, 1, 'e')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get your macro variable's (Stichdatum) value into a variable.&lt;/P&gt;&lt;P&gt;Assign values to dvar and hvar variables.&lt;/P&gt;&lt;P&gt;Store your format name 'faellig' in variable called fmtname and retain it in your control data set.&lt;/P&gt;&lt;P&gt;For low and high end of intervals, use 'l' and 'h' values for hlo variable, respectively.&lt;/P&gt;&lt;P&gt;Store your left end and right end values of intervals in Start and End variables (values separated by a dash on the left side of equal sign in proc format statement; e.g.:&lt;/P&gt;&lt;P&gt;20089 - 20453 = "2015").&lt;/P&gt;&lt;P&gt;Store your label in Label variable (e.g.: "2015").&lt;/P&gt;&lt;P&gt;Issue output statements after each interval constructed.&lt;/P&gt;&lt;P&gt;Construct do until loops to generate additional rows. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can read in this data set by using cntlin option in proc format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro genInt(Stichdatum);&lt;/P&gt;&lt;P&gt;data datefmt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if _n_ = 1 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Stichdatum = INPUT(SYMGET('Stichdatum'),anydtdte.); &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dvar&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp; stichdatum;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hvar&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = Intnx('month', dvar, 1, 'e');&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; retain fmtname 'dtfmt';&lt;/P&gt;&lt;P&gt;&amp;nbsp; If intnx('month',dvar,0,'e') &amp;lt; intnx('qtr',dvar,0,'e') then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hlo&amp;nbsp;&amp;nbsp; = 'l';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Start = .;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End&amp;nbsp;&amp;nbsp; = INTNX('Month',Stichdatum,0,'e');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Label = '0_abgelaufen';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; hlo&amp;nbsp; = ' ';&lt;/P&gt;&lt;P&gt;&amp;nbsp; dvar = Intnx('qtr', dvar, 1, 'b'); &lt;/P&gt;&lt;P&gt;&amp;nbsp; DO UNTIL (Intnx('Qtr', dvar, 0, 'e') &amp;gt; Intnx('year', hvar, 1, 'e'));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Start = Intnx('qtr', dvar, 0, 'b');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End&amp;nbsp;&amp;nbsp; = Intnx('Qtr', dvar, 0, 'e');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Label = PUT(Intnx('qtr', dvar, 0, 'end'), DDMMYYP10.);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dvar&amp;nbsp; = Intnx('qtr', dvar, 1, 'b');&lt;/P&gt;&lt;P&gt;&amp;nbsp; END;&lt;/P&gt;&lt;P&gt;&amp;nbsp; DO UNTIL (Intnx('semiyear', dvar, 0, 'e') &amp;gt; Intnx('year', hvar, 2, 'e'));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Start = Intnx('semiyear', dvar, 0, 'b');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End&amp;nbsp;&amp;nbsp; = Intnx('semiyear', dvar, 0, 'e');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Label = PUT(Intnx('semiyear', dvar, 0, 'end'), DDMMYYP10.);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dvar&amp;nbsp; = Intnx('semiyear', dvar, 1, 'b'); &lt;/P&gt;&lt;P&gt;&amp;nbsp; END;&lt;/P&gt;&lt;P&gt;&amp;nbsp; DO UNTIL (Intnx('year', dvar, 0, 'e') &amp;gt; Intnx('year', hvar, 6, 'e'));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Start = Intnx('year', dvar, 0, 'b');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End&amp;nbsp;&amp;nbsp; = Intnx('year', dvar, 0, 'e');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Label = PUT(Intnx('year', dvar, 0, 'end'), YEAR4.);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dvar&amp;nbsp; = Intnx('year', dvar, 1, 'b');&lt;/P&gt;&lt;P&gt;&amp;nbsp; END;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Start = Intnx('year', dvar, 0, 'b');&lt;/P&gt;&lt;P&gt;&amp;nbsp; End&amp;nbsp;&amp;nbsp; = .;&lt;/P&gt;&lt;P&gt;&amp;nbsp; hlo&amp;nbsp;&amp;nbsp; = 'h';&lt;/P&gt;&lt;P&gt;&amp;nbsp; Label = Catx(' ','nach' ,PUT(Intnx('year', dvar, -1, 'e'), YEAR4.));&lt;/P&gt;&lt;P&gt;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; format Start End Date9.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; keep fmtname Start End hlo Label;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc format cntlin = datefmt; run;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;%genInt(31May2012);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2012 08:13:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SYSFUNC-format-problem/m-p/83312#M17966</guid>
      <dc:creator>Alpay</dc:creator>
      <dc:date>2012-06-15T08:13:50Z</dc:date>
    </item>
  </channel>
</rss>

