GPSPOW
asked on
CAST equivalent in MS Access
What is the MS-Access equivalent to the SQL statement:
DATEADD(SECOND, CAST([FieldName],'1980-03- 01') between [AdmitDate] and [DischargeDate]
Thanks
glen
DATEADD(SECOND, CAST([FieldName],'1980-03-
Thanks
glen
ASKER
Sorry did not work.
Here is the SQL statement from the original SQL Stored Procedure:
DATEADD(SECOND,CAST(RXA.Me dRecSecond sID AS NUMERIC), '1980-03-01')
BETWEEN TP.AdmSerDateTime and TP.DischargeDateTime
The field RXA.MedRecSecondsID is NUMERIC in its source table.
example of data: 1056296349
I assume the data field holds the # of seconds since 1/1/1900.
The converted MedRecSecondsID falls between the two dates.
thanks
Glen
Here is the SQL statement from the original SQL Stored Procedure:
DATEADD(SECOND,CAST(RXA.Me
BETWEEN TP.AdmSerDateTime and TP.DischargeDateTime
The field RXA.MedRecSecondsID is NUMERIC in its source table.
example of data: 1056296349
I assume the data field holds the # of seconds since 1/1/1900.
The converted MedRecSecondsID falls between the two dates.
thanks
Glen
try using
Clng(RXA.MedRecSecondsID)
Clng(RXA.MedRecSecondsID)
ASKER
Would the statement be?
DATEADD("s",Clng(RXA.MedRe cSecondsID ), '1980-03-01')
BETWEEN TP.AdmSerDateTime and TP.DischargeDateTime
DATEADD("s",Clng(RXA.MedRe
BETWEEN TP.AdmSerDateTime and TP.DischargeDateTime
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you
It worked!
It worked!
Format([FieldName],'yyyy-m