Select case MyMonth
Case "mrt"
NewDate = MyDay & "Mar" & MyYear
Case "mei"
NewDate = MyDay & "May" & MyYear
End Select
[fieldname] = NewDate
End Function
This would work as long as you always used 2 characters for the day of the month (01, 02, 03, etc) and as long as you always used 3 characters for the month (mrt, mei, etc - I don't know the rest sorry). You would have a "Case" for all 12 months.
This function should parse out the month value and replace it with the value in quotes in each case. At the end, [fieldname] = NewDate, this is where you are replacing the value in the fieldname.
Hope this gives you some ideas!! I am sure that there is probably a way to do it easier, but I do not know how.
Functions in Access to convert date and time.
Format
FormatDateTime
Check the syntax for these functions in Access help. Also, look at the formatting options under help. Since the date/time is stored in the database regardless of your formatting, I am guessing that you want to convert the date to us english for the query criteria expression and then back to dutch for display to your users. The format functions can be used in both cases.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.