In Access, click Create > Module and paste the following code
Public Function ConvertMyStringToDateTime(strIn As String) As Date ConvertMyStringToDateTime = CDate( _ Mid(strIn, 1, 4) & "-" & Mid(strIn, 5, 2) & "-" & Mid(strIn, 7, 2) & " " & _ Mid(strIn, 9, 2) & ":" & Mid(strIn, 11, 2) & ":" & Mid(strIn, 13, 2)) End Function
Press Ctrl + S and save the module as modDateConversion .
Now try using a query like
Select * from Events Where Events.[Date] > ConvertMyStringToDateTime("20130423014854")
--- Edit ---
Alternative solution that excludes custom VBA function:
SELECT * FROM Events WHERE Format(Events.[Date],'yyyyMMddHhNnSs') > '20130423014854'
source share