<?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[[PHP] Convertire formato 'date' a 'unixstamp']]></title><description><![CDATA[<p dir="auto">Ciao a tutti.<br />
Ho un piccolo/grande problema. Dovrei convertire le date che ho inserito in tabelle mysql con formato <strong>date</strong>quindi in questo modo: 2009-10-19 nel formato <strong>UNIX timestamp</strong>. Non ho inserito l'orario perchè non mi serve, anche se necessito di questa conversione. Qualcuno riesce a farla?</p>
<p dir="auto">Grazie in anticipo</p>
]]></description><link>https://dev.connect.gt/topic/112910/php-convertire-formato-date-a-unixstamp</link><generator>RSS for Node</generator><lastBuildDate>Mon, 30 Nov 2026 15:53:29 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/112910.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 19 Oct 2009 10:03:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [PHP] Convertire formato 'date' a 'unixstamp' on Mon, 19 Oct 2009 18:41:56 GMT]]></title><description><![CDATA[<pre><code class="language-php">$item-&gt;date = strtotime($risultato_query['date']);
</code></pre>
]]></description><link>https://dev.connect.gt/post/864724</link><guid isPermaLink="true">https://dev.connect.gt/post/864724</guid><dc:creator><![CDATA[pater]]></dc:creator><pubDate>Mon, 19 Oct 2009 18:41:56 GMT</pubDate></item><item><title><![CDATA[Reply to [PHP] Convertire formato 'date' a 'unixstamp' on Mon, 19 Oct 2009 16:33:13 GMT]]></title><description><![CDATA[<pre><code class="language-php">&lt;?php
// Supponiamo che in $data ci sia 2009-10-19
$explode = explode('-', $data);
echo mktime (0,0,0, $explode[1], $explode[2], $explode[0]);
?&gt;
</code></pre>
]]></description><link>https://dev.connect.gt/post/864727</link><guid isPermaLink="true">https://dev.connect.gt/post/864727</guid><dc:creator><![CDATA[thedarkita]]></dc:creator><pubDate>Mon, 19 Oct 2009 16:33:13 GMT</pubDate></item><item><title><![CDATA[Reply to [PHP] Convertire formato 'date' a 'unixstamp' on Mon, 19 Oct 2009 16:28:12 GMT]]></title><description><![CDATA[<p dir="auto">Ciao Thedarkita e grazie. Mi faresti un esempio di explode e mktime in php? considera che poi dovrei passare tutto qui:</p>
<p dir="auto">$item-&gt;date = <strong>qui inserire il valore dell'unix timestamp</strong></p>
]]></description><link>https://dev.connect.gt/post/864728</link><guid isPermaLink="true">https://dev.connect.gt/post/864728</guid><dc:creator><![CDATA[stable]]></dc:creator><pubDate>Mon, 19 Oct 2009 16:28:12 GMT</pubDate></item><item><title><![CDATA[Reply to [PHP] Convertire formato 'date' a 'unixstamp' on Mon, 19 Oct 2009 15:09:58 GMT]]></title><description><![CDATA[<p dir="auto">Ciao stable,<br />
se vuoi farlo direttamente da mysql puoi usare la funzione UNIX_TIMESTAMP() nella query.<br />
Altrimenti da php puoi fare un explode per ottenere anno, mese e giorno e successivamente passarli nella funzione mktime.</p>
]]></description><link>https://dev.connect.gt/post/864725</link><guid isPermaLink="true">https://dev.connect.gt/post/864725</guid><dc:creator><![CDATA[thedarkita]]></dc:creator><pubDate>Mon, 19 Oct 2009 15:09:58 GMT</pubDate></item></channel></rss>