Pagina 3 di 3 primaprima 1 2 3
Visualizzazione dei risultati da 21 a 23 su 23
  1. #21
    Moderatore di ASP.net L'avatar di djciko
    Registrato dal
    Nov 2002
    Messaggi
    6,886
    anno_scolastico.items.add(elemento)


  2. #22
    Utente di HTML.it
    Registrato dal
    Jun 2002
    Messaggi
    1,183
    altro errore


    Conversion from type 'Integer' to type 'Date' is not valid.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.InvalidCastException: Conversion from type 'Integer' to type 'Date' is not valid.

    Source Error:

    Line 2497:For Each riga As System.Data.DataRow In dt.Rows
    Line 2498: Dim d As DateTime = New DateTime()
    Line 2499: d = CType(riga("datanum"), DateTime)
    Line 2500: Dim giorno As String = d.Day.ToString()
    Line 2501: Dim mese As String = d.Month.ToString()
    victor
    ----------------------

  3. #23
    Moderatore di ASP.net L'avatar di djciko
    Registrato dal
    Nov 2002
    Messaggi
    6,886
    il codice te l'ho scritto come esempio generico, i dettagli non li so

    dal db comunque tira fuori un Intero, è scritto, per questo va in errore. Non so come memorizzi la data...in quella istruzione stai recuperando la data dal DB e la stai mettendo in un tipo Datetime, per poi scomporla in giorno mese ed anno.

    ci sono altri mille modi per ottenere la data direttamente come vuoi (senza scomporla), in formato string. Guarda
    http://www.guru4.net/articoli/format...datetimeCustom

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.