Hi there,
When trying to query the DB with the following:
...WHERE ((filed)>=" & UKDate(sFromDat e) & " And (field)<=" & UKDate (sToDate) & ")
I'm getting output in american format.
The UKDate() function seems correct:
Function UKDate(varDate As Variant) As String
If IsDate(varDate) Then
UKDate = "#" & Format$(varDate , "dd\/mm\/yyyy") & "#"
End If
End Function
When debugging this, it shows correct english dates (when I mousover on each), yet it queries and outputs in the american format. The field in question in the DB is set (shows dates) in the english format - I dont understand why it doesn't output the desired english format.
Can somebpdy help?
Thanks in advance!!!
When trying to query the DB with the following:
...WHERE ((filed)>=" & UKDate(sFromDat e) & " And (field)<=" & UKDate (sToDate) & ")
I'm getting output in american format.
The UKDate() function seems correct:
Function UKDate(varDate As Variant) As String
If IsDate(varDate) Then
UKDate = "#" & Format$(varDate , "dd\/mm\/yyyy") & "#"
End If
End Function
When debugging this, it shows correct english dates (when I mousover on each), yet it queries and outputs in the american format. The field in question in the DB is set (shows dates) in the english format - I dont understand why it doesn't output the desired english format.
Can somebpdy help?
Thanks in advance!!!
Comment