Fai la tua domanda

Revision history [indietro]

click to hide/show revision 1
versione iniziale
Sub salvaData
    form = ThisComponent.DrawPage.Forms.GetByIndex(0)
    grezzo = form.datData.Date                                  '20171026'   Long/Object
'    oggi = CDateFromIso(grezzo)                                 '26/10/2017' Date
'    stringa = ""+ Year(oggi) +"-"+ Month(oggi) +"-"+ Day(oggi)  '2017-10-26' String
    mystringa = ""+ grezzo.Year +"-"+ grezzo.Month +"-"+ grezzo.Day 
    dateString = Format(mystringa, "YYYY-MM-DD")
    sql = form.ActiveConnection.CreateStatement
'    sql.Execute("UPDATE ""Tabella"" SET ""Data"" = '" + stringa + "'")
    sql.executeUpdate("UPDATE ""Tabella"" SET ""Data"" = '" + dateString + "'")
End Sub
Sub salvaData
    form = ThisComponent.DrawPage.Forms.GetByIndex(0)
    grezzo = form.datData.Date                                  '20171026'   Long/Object
'    oggi = CDateFromIso(grezzo)                                 '26/10/2017' Date
Date'
'    stringa = ""+ Year(oggi) +"-"+ Month(oggi) +"-"+ Day(oggi)  '2017-10-26' String
    mystringa = ""+ grezzo.Year +"-"+ grezzo.Month +"-"+ grezzo.Day 
    dateString = Format(mystringa, "YYYY-MM-DD")
    sql = form.ActiveConnection.CreateStatement
'    sql.Execute("UPDATE ""Tabella"" SET ""Data"" = '" + stringa + "'")
    sql.executeUpdate("UPDATE ""Tabella"" SET ""Data"" = '" + dateString + "'")
End Sub
Sub salvaData
    form = ThisComponent.DrawPage.Forms.GetByIndex(0)
    grezzo = form.datData.Date                                  '20171026'   Long/Object
'    oggi = CDateFromIso(grezzo)                                 '26/10/2017' Date'
'    stringa = ""+ Year(oggi) +"-"+ Month(oggi) +"-"+ Day(oggi)  '2017-10-26' String
String'
    mystringa = ""+ grezzo.Year +"-"+ grezzo.Month +"-"+ grezzo.Day 
    dateString = Format(mystringa, "YYYY-MM-DD")
    sql = form.ActiveConnection.CreateStatement
'    sql.Execute("UPDATE ""Tabella"" SET ""Data"" = '" + stringa + "'")
"'")'
    sql.executeUpdate("UPDATE ""Tabella"" SET ""Data"" = '" + dateString + "'")
End Sub