Predmet:Re: problem sa datumom u vba
Dim DatumS as string
DatumS="#" & Format(Me.datum,"mm-dd-yyyy") & "#"
Uslov="SELECT * FROM tblPK WHERE periodD=" & Datums
ovako hoće
hvala zxz
a hoće i ovako pomoću ove funkcije
Function SQLDate(varDate As Variant) As String
'Purpose: Return a delimited string in the date format used natively by JET SQL.
'Argument: A date/time value.
'Note: Returns just the date format if the argument has no time component,
' or a date/time format if it does.
'Author: Allen Browne. allen@allenbrowne.com, June 2006.
If IsDate(varDate) Then
If DateValue(varDate) = varDate Then
SQLDate = Format$(varDate, "\#mm\/dd\/yyyy\#")
Else
SQLDate = Format$(varDate, "\#mm\/dd\/yyyy hh\:nn\:ss\#")
End If
End If
End Function
e jesam se pošteno namučio
pozdrav