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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Reservation Query 1
Type mismatch in Function 5
basage modular 4
grouping issue with ' is not null ' 1
datepart function 3
Data type mismatch error --> text to date 1
Running Total 10
random number generation 2

Top