<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Quellcode für aktuelles Datum und Uhrzeit gesucht]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich bin auf der Suche nach einem vernüftigen Quellcode für die Anzeige des aktuellen Datums und der Uhrzeit. Toll wären zweit seperate Skripte</p>
<p>Hatte aus einer google Suche folgenden Code gefunden:</p>
<pre><code>#include &lt;iostream&gt;
using namespace std;
#include &lt;time.h&gt;

int main()
{
    time_t Zeitstempel;
    tm *nun;
    Zeitstempel = time(0);
    nun = localtime(&amp;Zeitstempel);
    cout &lt;&lt; nun-&gt;tm_mday &lt;&lt; '.' &lt;&lt; nun-&gt;tm_mon+1 &lt;&lt; '.'
        &lt;&lt; nun-&gt;tm_year+1900 &lt;&lt; &quot; - &quot; &lt;&lt; nun-&gt;tm_hour
        &lt;&lt; ':' &lt;&lt; nun-&gt;tm_min &lt;&lt; endl;
}
</code></pre>
<p>Jedoch ist dort das Problem, dass beim heutigen Datum nur folgendes ausgegeben wird: 14.1.2015 und nicht 14.01.2015</p>
<p>Gruß<br />
Julian</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/330530/quellcode-für-aktuelles-datum-und-uhrzeit-gesucht</link><generator>RSS for Node</generator><lastBuildDate>Fri, 03 Jul 2026 06:12:08 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/330530.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 14 Jan 2015 16:18:16 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Quellcode für aktuelles Datum und Uhrzeit gesucht on Wed, 14 Jan 2015 16:18:16 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich bin auf der Suche nach einem vernüftigen Quellcode für die Anzeige des aktuellen Datums und der Uhrzeit. Toll wären zweit seperate Skripte</p>
<p>Hatte aus einer google Suche folgenden Code gefunden:</p>
<pre><code>#include &lt;iostream&gt;
using namespace std;
#include &lt;time.h&gt;

int main()
{
    time_t Zeitstempel;
    tm *nun;
    Zeitstempel = time(0);
    nun = localtime(&amp;Zeitstempel);
    cout &lt;&lt; nun-&gt;tm_mday &lt;&lt; '.' &lt;&lt; nun-&gt;tm_mon+1 &lt;&lt; '.'
        &lt;&lt; nun-&gt;tm_year+1900 &lt;&lt; &quot; - &quot; &lt;&lt; nun-&gt;tm_hour
        &lt;&lt; ':' &lt;&lt; nun-&gt;tm_min &lt;&lt; endl;
}
</code></pre>
<p>Jedoch ist dort das Problem, dass beim heutigen Datum nur folgendes ausgegeben wird: 14.1.2015 und nicht 14.01.2015</p>
<p>Gruß<br />
Julian</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2437568</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2437568</guid><dc:creator><![CDATA[julianpe]]></dc:creator><pubDate>Wed, 14 Jan 2015 16:18:16 GMT</pubDate></item><item><title><![CDATA[Reply to Quellcode für aktuelles Datum und Uhrzeit gesucht on Wed, 14 Jan 2015 16:37:49 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>schau mal nach <a href="http://www.cplusplus.com/reference/iomanip/setfill/" rel="nofollow">setfill/setw</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2437571</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2437571</guid><dc:creator><![CDATA[Jockelx]]></dc:creator><pubDate>Wed, 14 Jan 2015 16:37:49 GMT</pubDate></item><item><title><![CDATA[Reply to Quellcode für aktuelles Datum und Uhrzeit gesucht on Wed, 14 Jan 2015 16:38:29 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;iomanip&gt;
using namespace std;
#include &lt;time.h&gt;

int main()
{
    time_t Zeitstempel;
    tm *nun;
    Zeitstempel = time(0);
    nun = localtime(&amp;Zeitstempel);
    cout  &lt;&lt; nun-&gt;tm_mday &lt;&lt; '.'  &lt;&lt; setw(2) &lt;&lt; setfill('0') &lt;&lt; nun-&gt;tm_mon+1 &lt;&lt; '.'
        &lt;&lt; nun-&gt;tm_year+1900 &lt;&lt; &quot; - &quot; &lt;&lt; nun-&gt;tm_hour
        &lt;&lt; ':' &lt;&lt; nun-&gt;tm_min &lt;&lt; endl;
}
</code></pre>
<p>Analog müsste Tag und Uhrzeit behandelt werden</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2437572</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2437572</guid><dc:creator><![CDATA[manni66]]></dc:creator><pubDate>Wed, 14 Jan 2015 16:38:29 GMT</pubDate></item><item><title><![CDATA[Reply to Quellcode für aktuelles Datum und Uhrzeit gesucht on Wed, 14 Jan 2015 21:01:09 GMT]]></title><description><![CDATA[<p>Warum die Standardbibliothek nachprogrammieren?<br />
<a href="http://en.cppreference.com/w/cpp/chrono/c" rel="nofollow">http://en.cppreference.com/w/cpp/chrono/c</a> (Abschnitt &quot;Format conversions&quot;)<br />
<a href="http://en.cppreference.com/w/cpp/io/manip/put_time" rel="nofollow">http://en.cppreference.com/w/cpp/io/manip/put_time</a> (wird leider noch nicht von allen gängigen Compilern unterstützt)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2437615</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2437615</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Wed, 14 Jan 2015 21:01:09 GMT</pubDate></item></channel></rss>