support datetime and smalldatetime