Ciao a tutti ho un problemino con le date che non riesco a risolvere mi escono tutte sballate e non capisco il motivo. Ecco il codice:
<table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
<asp:Repeater ID="lista_eventi" runat="server">
<HeaderTemplate>
<tr>
<td width="80"><div align="center" class="titoletti">Data</div></td>
<td><div align="center" class="titoletti">Titolo</div></td>
<td width="50"><div align="center" class="titoletti">Modifica</div></td>
<td width="50"><div align="center" class="titoletti">Cancella</div></td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td width="80"><div align="center" class="testonews"><%#convertidata(Container.DataIt em("data"))%></div></td>
<td><div align="left" class="testonews"><%#Container.DataItem("titolo")% ></div></td>
<td width="50"><div align="center">">Modifica</div></td>
<td width="50" background="canc_eventi.aspx"><div align="center">">Cancella</div></td>
</tr>
</ItemTemplate>
<FooterTemplate></FooterTemplate>
</asp:Repeater>
</table>
Function convertidata(ByVal str)
Dim giorno As String = Day(str)
Dim mese As String = Month(str)
Dim anno As String = Year(str)
'Response.Write(mese & "=giorno
" & giorno & "=mese
" & anno & "=anno
")
'Response.End()
If giorno <= 12 Then
convertidata = giorno & "/" & mese & "/" & anno
Else
convertidata = str
End If
End Function
ma cmq escono sballate