Pagina 3 di 3 primaprima 1 2 3
Visualizzazione dei risultati da 21 a 24 su 24
  1. #21
    quello è un problema comunque. complimenti a chi nel 2009 quasi 2010 ancora NON ha risolto il millennium bug... puoi solo fissare un limite (20? 30? 40?) al di sotto del quale aggiungi "20", altrimenti "19"

  2. #22
    Secondo te le logica che ho usato è corretta:

    codice:
    strIndirizzo=Replace(strIndirizzo,"'"," ")
       strData=Replace(strData,"-","/")
       
       if (MID(strData, 7, 8)) > 10 then
       strDataIns = MID(strData, 4, 2) & "/" & MID(strData, 1, 2) & "/" & "19" & MID(strData, 7, 8)
       else
       strDataIns = MID(strData, 4, 2) & "/" & MID(strData, 1, 2) & "/" & "20" & MID(strData, 7, 8)
       end if
       
       'response.write (MID(strData, 7, 8)) 
    
      
    
      ' strNumeroSocio = int(strNumeroSocio) 
       
       Set conn = Server.CreateObject("ADODB.Connection") 
       conn.Open "Driver={SQL Server}; Server=localhost; Database=portoflioBoseTest; Uid=web1Test; Pwd=bose1test;"
       SqlInsert = "SELECT numeroSocio, nome, cognome FROM dimension WHERE numeroSocio = '" & strNumeroSocio & "' AND nome = '" & strNome & "' AND cognome = '" & strCognome & "'"
       Set rsInsert = Conn.Execute(SqlInsert)
       If rsInsert.EOF Then
       strSQL = "INSERT INTO dimension (numeroSocio, saluto, nome, cognome, indirizzo, cap, citta, provincia, prefisso, telefono, email, eta, modello, data, matricola1, matricola2, rivenditore, localita, commenti, privacy, eta2) Values('"&strNumeroSocio&"', '"&strSaluto&"','"&strNome&"','"&strCognome&"','"&strIndirizzo&"','"&strCap&"','"&strCitta&"','"&strProvincia&"','"&strPrefisso&"','"&strTelefono&"','"&strEmail&"','"&strEta&"','"&strModello&"','"&strDataIns&"','"&strMatricola1&"','"&strMatricola2&"','"&strRivenditore&"','"&strLocalita&"','"&strCommenti&"','"&strPrivacy&"','"&strEta2&"')" 
       'response.write strSQL
       'conn.Execute strSQL 
       Set RECdown = CreateObject("ADODB.Recordset")
       set RECdown = conn.execute(strSQL) 
       Else
       Response.Write strNumeroSocio & "" & strNome & "" & strCognome
       Response.Write(" è già presente nel database.
    ")
       End If
       rsInsert.Close
       Set rsInsert = Nothing
       end if
     conta=conta+1
     Loop 
       
     objFile.Close 
     Set objFile = Nothing 
     Set fs = Nothing 
     conn.Close 
     Set conn = Nothing
    Se l'anno è superiore a 10 dovrà mettere 19 altrimenti 20.

    Comunque provo a sentire il cliente se in fase di esportazione può cambiare il formato della data.
    <a href="http://www.robertodidonato.it" target="_blank">Roberto Di Donato</a>

  3. #23
    codice:
    Secolo="20"
    IF (MID(strData, 7, 8)) > "10" then Secolo="19"
    
    strDataIns = MID(strData, 4, 2) & "/" & MID(strData, 1, 2) & "/" & Secolo & MID(strData, 7, 8)
    visto che le "/" le aggiunge la funzione puoi non fare la replace iniziale

  4. #24
    Lo tolgo immediatamente, me ne ero scordato.

    Ciao e grazie.
    <a href="http://www.robertodidonato.it" target="_blank">Roberto Di Donato</a>

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 © 2026 vBulletin Solutions, Inc. All rights reserved.