If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
date functions
Does anybody know how to calculate dates? I believe that it can be done
however, I am not sure where to start. I have admit date and discharge date on several hundred records. I need to get the number of days between admit date and discharge date per record_id. Select admit_date, discharge_date and record_id, (convert(admit_date) + convert(disharge_date)) As number_days From subject group by record_id; This is not working. I believe that I am going about this totally wrong according to the error messages generaed. Any advice is welcome and appreciated. Thanks, Mitchell -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...eries/200705/1 |
#2
|
|||
|
|||
date functions
Mitchell_Collen via AccessMonster.com wrote:
Does anybody know how to calculate dates? I believe that it can be done however, I am not sure where to start. I have admit date and discharge date on several hundred records. I need to get the number of days between admit date and discharge date per record_id. Select admit_date, discharge_date and record_id, (convert(admit_date) + convert(disharge_date)) As number_days From subject group by record_id; This is not working. I believe that I am going about this totally wrong according to the error messages generaed. Any advice is welcome and appreciated. Thanks, Mitchell There is a function named DateDiff(). In your case... DateDiff("d", admit_date, disharge_date) -- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com |
#3
|
|||
|
|||
date functions
Rick Brandt wrote:
Does anybody know how to calculate dates? I believe that it can be done however, I am not sure where to start. [quoted text clipped - 14 lines] Thanks, Mitchell There is a function named DateDiff(). In your case... DateDiff("d", admit_date, disharge_date) Thanks so much. I wasn't sure of the correct way to use that. -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...eries/200705/1 |
Thread Tools | |
Display Modes | |
|
|