1 2 3 4 5 6 7 8 9 10 11 12 13 14
| Dim OrdreSQL As String
Dim Deb As Integer, Fin As Integer, StrDate As String, StrReplace As String
OrdreSQL = "select v203.c_fadr_a203 from v203 where (v203.c_fadr_a203 > {d '2016-01-01'}) ;" ' ********* pour essais ***********
Deb = InStr(OrdreSQL, "{d '")
If Deb <> 0 Then
Deb = Deb + 4
Fin = InStr(Deb, OrdreSQL, "'}", vbTextCompare)
StrDate = Mid(OrdreSQL, Deb, Fin - Deb)
StrReplace = Replace(StrDate, "-", "")
StrDate = "{d '" & StrDate & "'}"
OrdreSQL = Replace(OrdreSQL, StrDate, StrReplace)
'MsgBox OrdreSQL, vbInformation ' ********* pour essais ***********
End If |
Partager