<?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[Manipolazione della data]]></title><description><![CDATA[<p dir="auto">Salve a tutti.<br />
Ho creato una grid view che estrapola da una tabella di articoli il titolo e la data di pubblicazione.<br />
questo è il codice della grid view</p>
<pre><code>[SIZE=2][COLOR=#0000ff]&lt;[/COLOR][/SIZE][SIZE=2][COLOR=#800000]asp[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]:[/COLOR][/SIZE][SIZE=2][COLOR=#800000]GridView[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]ID[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="GridView1"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]runat[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="server"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]AutoGenerateColumns[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="False"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]DataKeyNames[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="idArticolo"[/COLOR][/SIZE]
[SIZE=2][COLOR=#ff0000]DataSourceID[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="ObjectDataSource1"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]HorizontalAlign[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="Center"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]Width[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="700px"&gt;[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]&lt;[/COLOR][/SIZE][SIZE=2][COLOR=#800000]Columns[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]&gt;[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]&lt;[/COLOR][/SIZE][SIZE=2][COLOR=#800000]asp[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]:[/COLOR][/SIZE][SIZE=2][COLOR=#800000]BoundField[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]DataField[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="titolo"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]HeaderText[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="titolo"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]SortExpression[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="titolo"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]/&gt;[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]&lt;[/COLOR][/SIZE][SIZE=2][COLOR=#800000]asp[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]:[/COLOR][/SIZE][SIZE=2][COLOR=#800000]BoundField[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]DataField[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="dataPubblicazione"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]HeaderText[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="data pubblicazione"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]SortExpression[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="dataPubblicazione"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]/&gt;[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]&lt;/[/COLOR][/SIZE][SIZE=2][COLOR=#800000]Columns[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]&gt;[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]&lt;/[/COLOR][/SIZE][SIZE=2][COLOR=#800000]asp[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]:[/COLOR][/SIZE][SIZE=2][COLOR=#800000]GridView[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]&gt;[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]&lt;[/COLOR][/SIZE][SIZE=2][COLOR=#800000]asp[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]:[/COLOR][/SIZE][SIZE=2][COLOR=#800000]ObjectDataSource[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]ID[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="ObjectDataSource1"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]runat[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="server"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]DeleteMethod[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="Delete"[/COLOR][/SIZE]
[SIZE=2][COLOR=#ff0000]OldValuesParameterFormatString[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="original_{0}"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]SelectMethod[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="GetData"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]TypeName[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="NewsDataLayerTableAdapters.ArticoliTableAdapter"[/COLOR][/SIZE]
[SIZE=2][COLOR=#ff0000]UpdateMethod[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="Update"&gt;[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]&lt;[/COLOR][/SIZE][SIZE=2][COLOR=#800000]DeleteParameters[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]&gt;[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]&lt;[/COLOR][/SIZE][SIZE=2][COLOR=#800000]asp[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]:[/COLOR][/SIZE][SIZE=2][COLOR=#800000]Parameter[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]Name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="Original_idArticolo"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]Type[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="Int64"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]/&gt;[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]&lt;/[/COLOR][/SIZE][SIZE=2][COLOR=#800000]DeleteParameters[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]&gt;[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]&lt;[/COLOR][/SIZE][SIZE=2][COLOR=#800000]UpdateParameters[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]&gt;[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]&lt;[/COLOR][/SIZE][SIZE=2][COLOR=#800000]asp[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]:[/COLOR][/SIZE][SIZE=2][COLOR=#800000]Parameter[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]Name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="nomeAutore"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]Type[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="String"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]/&gt;[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]&lt;[/COLOR][/SIZE][SIZE=2][COLOR=#800000]asp[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]:[/COLOR][/SIZE][SIZE=2][COLOR=#800000]Parameter[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]Name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="titolo"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]Type[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="String"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]/&gt;[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]&lt;[/COLOR][/SIZE][SIZE=2][COLOR=#800000]asp[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]:[/COLOR][/SIZE][SIZE=2][COLOR=#800000]Parameter[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]Name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="dataPubblicazione"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]Type[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="DateTime"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]/&gt;[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]&lt;[/COLOR][/SIZE][SIZE=2][COLOR=#800000]asp[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]:[/COLOR][/SIZE][SIZE=2][COLOR=#800000]Parameter[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]Name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="corpoArticolo"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]Type[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="String"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]/&gt;[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]&lt;[/COLOR][/SIZE][SIZE=2][COLOR=#800000]asp[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]:[/COLOR][/SIZE][SIZE=2][COLOR=#800000]Parameter[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]Name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="Original_idArticolo"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]Type[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="Int64"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]/&gt;[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]&lt;/[/COLOR][/SIZE][SIZE=2][COLOR=#800000]UpdateParameters[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]&gt;[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]&lt;/[/COLOR][/SIZE][SIZE=2][COLOR=#800000]asp[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]:[/COLOR][/SIZE][SIZE=2][COLOR=#800000]ObjectDataSource[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]&gt;[/COLOR][/SIZE]
</code></pre>
<p dir="auto">Ora però lui visualizza la data così come è salvata sulla tabella, in formato gg/mm/aaaa hh.mm.ss . A me interessa solo il formato gg/mm/aaaa. Sapreste dirmi come posso modificare la visualizzazione della data.</p>
]]></description><link>https://dev.connect.gt/topic/84557/manipolazione-della-data</link><generator>RSS for Node</generator><lastBuildDate>Tue, 01 Dec 2026 20:23:30 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/84557.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 07 Oct 2008 07:29:28 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Manipolazione della data on Wed, 08 Oct 2008 09:26:19 GMT]]></title><description><![CDATA[<p dir="auto">Puoi usare una funzione nella pagina, che richiami dalla gridview. Converti il bound field in un template field, fai una funzione che prende un oggeto lo parsa a data e restituisce la data formattata come vuoi, e la richiami dalla gradview così:</p>
<p dir="auto">&lt;%# GetData(Eval("Data")) %&gt;</p>
<p dir="auto">dove getdata è il nome della funzione</p>
]]></description><link>https://dev.connect.gt/post/766533</link><guid isPermaLink="true">https://dev.connect.gt/post/766533</guid><dc:creator><![CDATA[cali1981]]></dc:creator><pubDate>Wed, 08 Oct 2008 09:26:19 GMT</pubDate></item></channel></rss>