<?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: Issue with the Title Date &amp;amp; Time in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Issue-with-the-Title-Date-amp-Time/m-p/952225#M372171</link>
    <description>&lt;P&gt;SAS does not have FORMAT with that name.&lt;/P&gt;
&lt;PRE&gt;69   %put current_datetime = %sysfunc(datetime(), datetimeampm.);
ERROR: Format name DATETIMEAMPM. not found or the width and/or decimal specified for the format used are out of range.
current_datetime = 2048627120.622

&lt;/PRE&gt;
&lt;P&gt;Did you mean to use the DATEAMPM format instead?&amp;nbsp; Or perhaps DATEAMPM23.?&lt;/P&gt;
&lt;PRE&gt;70   %put current_datetime = %sysfunc(datetime(), dateampm.);
current_datetime = 30NOV24:11:08:28 PM
71   %put current_datetime = %sysfunc(datetime(), dateampm23.);
current_datetime =   30NOV2024:11:09:40 PM

&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 01 Dec 2024 04:10:13 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2024-12-01T04:10:13Z</dc:date>
    <item>
      <title>Issue with the Title Date &amp; Time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issue-with-the-Title-Date-amp-Time/m-p/952224#M372170</link>
      <description>&lt;P&gt;I have the following parts of some code I have:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc import datafile="FILE_PATH" 
    out=sample_data 
    dbms=csv 
    replace;
    getnames=yes;
run;


/* get current date and time for titles in AM/PM format */
%let current_datetime = %sysfunc(datetime(), datetimeampm.);

proc sql;
    create table my_output as
    SQL Code
quit;

title1 "First Name &amp;amp; Last Name";
title2 "Date and Time: &amp;amp;current_datetime";
title3 "Title of Output";

proc print data=my_output; 
run;&lt;/PRE&gt;&lt;P&gt;However, the title2 in my output shows up as:&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;TABLE border="0" cellspacing="1" cellpadding="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Date and Time: 2048615388.473&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why isn't it showing in a MM/DD/YYYY AM/PM format? How can I fix it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Dec 2024 03:58:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issue-with-the-Title-Date-amp-Time/m-p/952224#M372170</guid>
      <dc:creator>unwashedhelimix</dc:creator>
      <dc:date>2024-12-01T03:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with the Title Date &amp; Time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issue-with-the-Title-Date-amp-Time/m-p/952225#M372171</link>
      <description>&lt;P&gt;SAS does not have FORMAT with that name.&lt;/P&gt;
&lt;PRE&gt;69   %put current_datetime = %sysfunc(datetime(), datetimeampm.);
ERROR: Format name DATETIMEAMPM. not found or the width and/or decimal specified for the format used are out of range.
current_datetime = 2048627120.622

&lt;/PRE&gt;
&lt;P&gt;Did you mean to use the DATEAMPM format instead?&amp;nbsp; Or perhaps DATEAMPM23.?&lt;/P&gt;
&lt;PRE&gt;70   %put current_datetime = %sysfunc(datetime(), dateampm.);
current_datetime = 30NOV24:11:08:28 PM
71   %put current_datetime = %sysfunc(datetime(), dateampm23.);
current_datetime =   30NOV2024:11:09:40 PM

&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Dec 2024 04:10:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issue-with-the-Title-Date-amp-Time/m-p/952225#M372171</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-12-01T04:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with the Title Date &amp; Time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issue-with-the-Title-Date-amp-Time/m-p/952227#M372172</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let current_datetime = %sysfunc(datetime(), mdyampm.);
title1 "First Name &amp;amp; Last Name";
title2 "Date and Time: &amp;amp;current_datetime";
proc print data=sashelp.class;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1733032954735.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/102607i34979709598FDF8A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1733032954735.png" alt="Ksharp_0-1733032954735.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Dec 2024 06:02:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issue-with-the-Title-Date-amp-Time/m-p/952227#M372172</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-12-01T06:02:40Z</dc:date>
    </item>
  </channel>
</rss>

