Funzione in LotusScript per formattare una data restituendo una stringa nel formato GGMMAAAA oppure AAAAMMGG.
%REM Function aggiustadata senso = 1 data nel formato GGMMAAAA sens0 = 2 data nel formato AAAAMMGG %END REM function aggiustadata (entrata As NotesDateTime, senso As integer) As String Dim anno As String Dim mese As String Dim giorno As string anno = CStr(Year(entrata.dateonly)) mese = CStr(Month(entrata.dateonly)) If Len(mese) = 1 Then mese = "0" + mese giorno = CStr(day(entrata.dateonly)) If Len(giorno) = 1 Then giorno = "0" + giorno Select Case senso Case 1 aggiustadata = giorno + mese + anno Case 2 aggiustadata = anno + mese + giorno End Select End Function
0 commenti