Rx_
Nothing In Moderation
- Local time
- Today, 06:52
- Joined
- Oct 22, 2009
- Messages
- 2,803
Data imports with a column of Year and column for Month where month is "Jan", "Feb", ...
Use an Update Query with a custom VBA Formual to convert. Add a new coloumn "MO" for the numeric version of Month.
(See attachment)
Use an Update Query with a custom VBA Formual to convert. Add a new coloumn "MO" for the numeric version of Month.
(See attachment)
Code:
Function MonthText2Number(sMonthName As String) As Integer
' in Access table, create field MO - Then use this in Update Query
' In an Access Create a Module with this function
' sMonthName = "Oct" ' October will also work October returns a 10
10 MonthText2Number = Month(DateValue("01-" & sMonthName & "-2000"))
20 Exit Function
ErrorTrap:
30 MonthText2Number = 0
End Function