MajP
You've got your good things, and you've got mine.
- Local time
- Today, 15:46
- Joined
- May 21, 2018
- Messages
- 8,904
Has anyone work with this data type? Is there any tricks. I helped someone with a database that was originally just a standard date. When they converted the field to date time extended it broke a lot of things.
Most date functions and formatting functions do not work with this. Things like cdate, isdate, dateserial, year, month, etc fail with a datatype mistmatch. I cannot pass the value as a date.
The strangest thing is that in a recordset the date time extended fields appears to be returned as a string. I am able to do string manipulations on them but cannot treat them like date values.
In this part of the code I return and RS with two date time extended fields. RS!dtsStart and rs!dtsStop
The date functions do not work, but string functions do such as "left". I tried to format as string first and then convert to date, and even that failed.
Set rs = CurrentDb.OpenRecordset("Select * from alarms where dateSerial(Year([dtsStart]),Month([dtsStart]),day([dtsStart])) = #" & Format(dtmDate, "MM/DD/yyyy") & "# AND [name] = '" & theName & "'", dbOpenDynaset)
a
Most date functions and formatting functions do not work with this. Things like cdate, isdate, dateserial, year, month, etc fail with a datatype mistmatch. I cannot pass the value as a date.
The strangest thing is that in a recordset the date time extended fields appears to be returned as a string. I am able to do string manipulations on them but cannot treat them like date values.
In this part of the code I return and RS with two date time extended fields. RS!dtsStart and rs!dtsStop
The date functions do not work, but string functions do such as "left". I tried to format as string first and then convert to date, and even that failed.
Set rs = CurrentDb.OpenRecordset("Select * from alarms where dateSerial(Year([dtsStart]),Month([dtsStart]),day([dtsStart])) = #" & Format(dtmDate, "MM/DD/yyyy") & "# AND [name] = '" & theName & "'", dbOpenDynaset)
a