3 messages in org.openoffice.fr.progRe: [prog] format de date et sql
FromSent OnAttachments
Kohler GerardJan 31, 2009 3:12 am 
François BreizhJan 31, 2009 3:35 am 
Kohler GerardJan 31, 2009 3:55 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [prog] format de date et sqlActions...
From:Kohler Gerard (koh@oceanetpro.net)
Date:Jan 31, 2009 3:55:20 am
List:org.openoffice.fr.prog

François Breizh a écrit :

Pour ma part je me suis écrit une fonction : '************************************************************************** FormatDate Function FormatDate(DateFournie As String) As String '-------------------------------------------------------------------------

' Retourne une date au format "AAAA-MM-DD" ' Le paramètre DateFournie doit correspondre à une date '-------------------------------------------------------------------------

Dim Reponse As String Dim Donnee As Date

If IsDate (DateFournie) Then Donnee = CDate(DateFournie) Reponse = Year(Donnee) & "-" & Month(Donnee) & "-" & Day(Donnee) Else Reponse = "0000-00-00" End If FormatDate = Reponse End Function

Merci pour l'aide,

effectivement en relisant la doc sur SQL le format des dates j'aurais pu y arriver, mais je me suis pris la tête toute la journée sur ce programme et là je callais

merci

Gérard