Frances L
SSCarpal Tunnel
Points: 4727
More actions
February 4, 2011 at 9:10 am
#148334
AdmDtAdmTm
2010-11-2212:52
2010-12-0613:03
2010-12-0912:22
I have table with admDt and admTm. I want to combine those two field together and format the new field as long date so that I can find out the date difference with other field. Thanks.
February 4, 2011 at 9:19 am
#1282538
in ms access I found this way:
DateAdd("d",0,DateDiff("d",0,[AdmDt]))+DateAdd("d",0-DateDiff("d",0,[AdmTm]),[AdmTm])
Thx.
skt5000
SSC-Addicted
Points: 479
February 10, 2011 at 6:41 am
#1285137
SELECT Convert(datetime,CONVERT(varchar(20),AdmDt)+ ' ' +CONVERT(varchar(5),AdmTm))
SELECT DATEADD(d,datediff(day,convert(datetime,admtm),admdt ,convert(datetime,admtm) )
Jim
February 10, 2011 at 6:44 am
#1285138
In MS Access, do not have the function convert. Thx.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply