<?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: Date in the Format YYMMDD in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/date-in-the-format-yymmdd/m-p/4721365#M40828</link>
    <description>&lt;!--!*#--&gt;&amp;gt; [...] There's&lt;BR /&gt;&amp;gt; seldom only one correct way.  [...]&lt;BR /&gt;&lt;BR /&gt;alp $ t = f$time()&lt;BR /&gt;alp $ write sys$output f$extract( 2, 2, f$cvtime( t, , "YEAR"))+ -&lt;BR /&gt;_alp $ f$cvtime( t, , "MONTH")+ f$cvtime( t, , "DAY")&lt;BR /&gt;101203&lt;BR /&gt;&lt;BR /&gt;As usual, many things are possible.</description>
    <pubDate>Fri, 03 Dec 2010 11:39:47 GMT</pubDate>
    <dc:creator>Steven Schweda</dc:creator>
    <dc:date>2010-12-03T11:39:47Z</dc:date>
    <item>
      <title>Date in the Format YYMMDD</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/date-in-the-format-yymmdd/m-p/4721362#M40825</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I was wondering if someone could provide me with the correct function/syntax to get the date the format YYMMDD, so 03-Dec-2010 will display as 101203.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Niall</description>
      <pubDate>Fri, 03 Dec 2010 11:08:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/date-in-the-format-yymmdd/m-p/4721362#M40825</guid>
      <dc:creator>Niall76</dc:creator>
      <dc:date>2010-12-03T11:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: Date in the Format YYMMDD</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/date-in-the-format-yymmdd/m-p/4721363#M40826</link>
      <description>&lt;!--!*#--&gt;You want _the_ correct anything?  There's&lt;BR /&gt;seldom only one correct way.  If "the date"&lt;BR /&gt;means today's date, then this seems to work:&lt;BR /&gt;&lt;BR /&gt;alp $ write sys$output f$extract( 2, 8, f$cvtime( f$time()))- "-"- "-"&lt;BR /&gt;101203&lt;BR /&gt;&lt;BR /&gt;If you want to convert some arbitrary date,&lt;BR /&gt;then you could replace "f$time()" with the&lt;BR /&gt;appropriate string:&lt;BR /&gt;&lt;BR /&gt;alp $ write sys$output f$extract( 2, 8, f$cvtime( "25-Dec-2010"))- "-"- "-"&lt;BR /&gt;101225&lt;BR /&gt;&lt;BR /&gt;      HELP LEXICALS</description>
      <pubDate>Fri, 03 Dec 2010 11:24:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/date-in-the-format-yymmdd/m-p/4721363#M40826</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2010-12-03T11:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: Date in the Format YYMMDD</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/date-in-the-format-yymmdd/m-p/4721364#M40827</link>
      <description>&amp;gt;       HELP LEXICALS&lt;BR /&gt;&lt;BR /&gt;Hmmm.  Taking my own advice, for today's&lt;BR /&gt;date, there's yet another default value in&lt;BR /&gt;F$CVTIME():&lt;BR /&gt;&lt;BR /&gt;alp $ write sys$output f$extract( 2, 8, f$cvtime())- "-"- "-"&lt;BR /&gt;101203&lt;BR /&gt;</description>
      <pubDate>Fri, 03 Dec 2010 11:28:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/date-in-the-format-yymmdd/m-p/4721364#M40827</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2010-12-03T11:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: Date in the Format YYMMDD</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/date-in-the-format-yymmdd/m-p/4721365#M40828</link>
      <description>&lt;!--!*#--&gt;&amp;gt; [...] There's&lt;BR /&gt;&amp;gt; seldom only one correct way.  [...]&lt;BR /&gt;&lt;BR /&gt;alp $ t = f$time()&lt;BR /&gt;alp $ write sys$output f$extract( 2, 2, f$cvtime( t, , "YEAR"))+ -&lt;BR /&gt;_alp $ f$cvtime( t, , "MONTH")+ f$cvtime( t, , "DAY")&lt;BR /&gt;101203&lt;BR /&gt;&lt;BR /&gt;As usual, many things are possible.</description>
      <pubDate>Fri, 03 Dec 2010 11:39:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/date-in-the-format-yymmdd/m-p/4721365#M40828</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2010-12-03T11:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: Date in the Format YYMMDD</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/date-in-the-format-yymmdd/m-p/4721366#M40829</link>
      <description>&lt;BR /&gt;&amp;gt;&amp;gt;  the correct function/syntax&lt;BR /&gt;&lt;BR /&gt;In what context / language&lt;BR /&gt;DECforms? TDMS? / Cobol? Basic?&lt;BR /&gt;What is the representation of the source date?&lt;BR /&gt;What need to happen for 19xx dates? 21xx?&lt;BR /&gt;Should there be a sliding window?&lt;BR /&gt;&lt;BR /&gt;As Steven wrote, in DCL one can just take the leading century characters away.&lt;BR /&gt;The easiest way to do that, and most sloppy way, is:&lt;BR /&gt;&lt;BR /&gt;$ write sys$output f$cvtime(,,"DATE") -"20"-"-"-"-"&lt;BR /&gt;&lt;BR /&gt;Hein&lt;BR /&gt;</description>
      <pubDate>Fri, 03 Dec 2010 13:30:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/date-in-the-format-yymmdd/m-p/4721366#M40829</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2010-12-03T13:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: Date in the Format YYMMDD</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/date-in-the-format-yymmdd/m-p/4721367#M40830</link>
      <description>Niall,&lt;BR /&gt;&lt;BR /&gt;If you want the dates to be displayed this way in direcotory or other utilities that use the LIB$ routines like LIB$FORMAT_DATE_TIME to format dates, then you can define the logical LIB$DT_FORMAT to one of many format types.&lt;BR /&gt;&lt;BR /&gt;See sys$manager:systartup_vms.template (and search for date), and SYS$STARTUP:LIB$DT_STARTUP.COM for the predefined format specifiers.&lt;BR /&gt;&lt;BR /&gt;Here's an example: (This assumes LIB$DT_STARTUP was used in startup)&lt;BR /&gt;&lt;BR /&gt;$ sho log lib$dt_format  &lt;BR /&gt;   "LIB$DT_FORMAT" = "LIB$DATE_FORMAT_001" (LNM$SYSTEM_TABLE)&lt;BR /&gt;        = "LIB$TIME_FORMAT_001"&lt;BR /&gt;$ dir sys$login:login.com;/date&lt;BR /&gt;&lt;BR /&gt;Directory ROOT$USERS:[JON]&lt;BR /&gt;&lt;BR /&gt;LOGIN.COM;245        12-DEC-2009 11:56:30.00&lt;BR /&gt;&lt;BR /&gt;Total of 1 file.&lt;BR /&gt;$ def lib$dt_format lib$date_format_026&lt;BR /&gt;$ dir sys$login:login.com;/date&lt;BR /&gt;&lt;BR /&gt;Directory ROOT$USERS:[JON]&lt;BR /&gt;&lt;BR /&gt;LOGIN.COM;245        091212&lt;BR /&gt;&lt;BR /&gt;Total of 1 file.&lt;BR /&gt;$ def lib$dt_format lib$date_format_026,lib$time_format_001&lt;BR /&gt;%DCL-I-SUPERSEDE, previous value of LIB$DT_FORMAT has been superseded&lt;BR /&gt;$ dir sys$login:login.com;/date&lt;BR /&gt;&lt;BR /&gt;Directory ROOT$USERS:[JON]&lt;BR /&gt;&lt;BR /&gt;LOGIN.COM;245        091212 11:56:30.00&lt;BR /&gt;&lt;BR /&gt;Total of 1 file.&lt;BR /&gt;$ sho log lib$dt_format&lt;BR /&gt;   "LIB$DT_FORMAT" = "LIB$DATE_FORMAT_026" (LNM$PROCESS_TABLE)&lt;BR /&gt;        = "LIB$TIME_FORMAT_001"&lt;BR /&gt;   "LIB$DT_FORMAT" = "LIB$DATE_FORMAT_001" (LNM$SYSTEM_TABLE)&lt;BR /&gt;        = "LIB$TIME_FORMAT_001"&lt;BR /&gt;$ deas lib$dt_format&lt;BR /&gt;$ dir sys$login:login.com;/date&lt;BR /&gt;&lt;BR /&gt;Directory ROOT$USERS:[JON]&lt;BR /&gt;&lt;BR /&gt;LOGIN.COM;245        12-DEC-2009 11:56:30.00&lt;BR /&gt;&lt;BR /&gt;Total of 1 file.&lt;BR /&gt;$&lt;BR /&gt;&lt;BR /&gt;Jon</description>
      <pubDate>Fri, 03 Dec 2010 19:44:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/date-in-the-format-yymmdd/m-p/4721367#M40830</guid>
      <dc:creator>Jon Pinkley</dc:creator>
      <dc:date>2010-12-03T19:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: Date in the Format YYMMDD</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/date-in-the-format-yymmdd/m-p/4721368#M40831</link>
      <description>Hi guys,&lt;BR /&gt;&lt;BR /&gt;Thanks for your responses; it was 'my bad'. What I want is to be able to define today's date in a com file so I will to be able to copy a file with today's date as part of the file name. So something like this:&lt;BR /&gt;&lt;BR /&gt;$ write sys$output f$extract( 2, 8, f$cvtime( f$time()))- "-"- "-"&lt;BR /&gt;$!&lt;BR /&gt;$! **define date (below) to be the output of the above**&lt;BR /&gt;$ scp2 games_'date'.XML &lt;BR /&gt;"root@10.10.10.100::/srv/games.xml"&lt;BR /&gt;&lt;BR /&gt;Sorry for the confusion.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Niall&lt;BR /&gt;</description>
      <pubDate>Mon, 06 Dec 2010 12:54:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/date-in-the-format-yymmdd/m-p/4721368#M40831</guid>
      <dc:creator>Niall76</dc:creator>
      <dc:date>2010-12-06T12:54:43Z</dc:date>
    </item>
    <item>
      <title>Re: Date in the Format YYMMDD</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/date-in-the-format-yymmdd/m-p/4721369#M40832</link>
      <description>Niall, pls try with this dcl example and change the sentences as you consider &lt;BR /&gt;&lt;BR /&gt;$ set noon&lt;BR /&gt;$ set nover&lt;BR /&gt;$ wfechahoy = f$cvtime("today","comparison",)&lt;BR /&gt;$ aammdd = f$extract(2,2,wfechahoy) + f$extract(5,2,wfechahoy) + f$extract(8,2,wfechahoy) &lt;BR /&gt;$ sh symb aammdd  &lt;BR /&gt;$ descrip_file = "FILE_DATE_" + aadddd + ".XML;"&lt;BR /&gt;$&lt;BR /&gt;$ dir 'descrip_file&lt;BR /&gt;$!&lt;BR /&gt;&lt;BR /&gt;Good luck, &lt;BR /&gt;Eduardo</description>
      <pubDate>Tue, 07 Dec 2010 21:21:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/date-in-the-format-yymmdd/m-p/4721369#M40832</guid>
      <dc:creator>lalo57</dc:creator>
      <dc:date>2010-12-07T21:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: Date in the Format YYMMDD</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/date-in-the-format-yymmdd/m-p/4721370#M40833</link>
      <description>Sorry Niall, i've updated the lines of this example:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;$!Start DCL&lt;BR /&gt;$ set noon&lt;BR /&gt;$ set nover&lt;BR /&gt;$ wfechahoy = f$cvtime("today","comparison",)&lt;BR /&gt;$ aammdd = f$extract(2,2,wfechahoy) + f$extract(5,2,wfechahoy) + f$extract(8,2,wfechahoy) &lt;BR /&gt;$ sh symb aammdd&lt;BR /&gt;$ descrip_file = "FILE_DATE_" + aammdd + ".XML;"&lt;BR /&gt;$&lt;BR /&gt;$ dir sys$startup:ope*.log /out='descrip_file&lt;BR /&gt;$ dir 'descrip_file&lt;BR /&gt;$!&lt;BR /&gt;$!End DCL</description>
      <pubDate>Tue, 07 Dec 2010 21:28:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/date-in-the-format-yymmdd/m-p/4721370#M40833</guid>
      <dc:creator>lalo57</dc:creator>
      <dc:date>2010-12-07T21:28:53Z</dc:date>
    </item>
  </channel>
</rss>

