par Michael DELIQUE » 24 Nov 2010 à 12:16
Oui, regarde ça
- Code : Tout sélectionner
Public Function DateSystemFormat() As String
'renvois le format de la date
Dim international As NotesInternational
Dim Separator As String
On Error Goto ErreurHandle
DateSystemFormat = ""
If Session Is Nothing Then
Set Session = New NotesSession
End If
Set international = Session.International
Separator = international.DateSep
If international.IsDateDMY Then
DateSystemFormat = "DD"+Separator+"MM"+Separator+"YYYY"
Elseif international.IsDateMDY Then
DateSystemFormat = "MM"+Separator+"DD"+Separator+"YYYY"
Elseif international.IsDateYMD Then
DateSystemFormat = "YYYY"+Separator+"MM"+Separator+"DD"
Else
Error 9999,"Error Format date !"
Exit Function
End If
Set international = Nothing
Exit Function
ErreurHandle:
Msgbox "("+Structure_Log+" : "+Cstr(Getthreadinfo (1))+" Call by "+Cstr(Getthreadinfo(10))+")"+Chr(10)+"Erreur " + Str(Err) + " : "+Chr(10) + Cstr(Error)+". "+Chr(10)+"Ligne N° "+Cstr(Erl),16," ERREUR !"
DateSystemFormat = ""
Exit Function
End Function
Cordialement
Michael (SMS-Phobique)
----------------------------
"La théorie, c'est quand on sait tout et que rien ne fonctionne. La pratique, c'est quand tout fonctionne et que personne ne sait pourquoi."
Albert EINSTEIN