Convert Dates

B

Brig R. Lamoreaux

Would the following work?

<code start>

Public Function CDateFirst(datIn) as date
Dim datOut as date

datOut = CDate(DatePart("M", datIn) & "/01/" & DatePart
("yyyy", datIn))

' return result
CDateFirst = datOut

End Function

<code end>

Then use this function in a update query.

Update tblFoo
SET FieldDate = CDateFirst(FieldDate)


Hope this helps,
Brig
 
Top