WaitronUnit
IS-IT--Management
- Dec 2, 2003
- 38
I am a database novice and can't get datetime usage right. There is a stored procedure named ms_purgeolddata that when I enter
exec ms_purgeolddata null
it works fine and will delete all past data. What I need to find out is how to delete data prior to a certain time, like midnight on Decmber 31, 2004. I have tried
exec ms_purgeolddata @date 20050101
exec ms_purgeolddata @date=20050101
exec ms_purgeolddata 20050101
exec ms_purgeolddata @date 200501301 00:00:00
etc., and I keep getting "Error converting data type int to datetime." What I am doing wrong? Thanks for any help!
exec ms_purgeolddata null
it works fine and will delete all past data. What I need to find out is how to delete data prior to a certain time, like midnight on Decmber 31, 2004. I have tried
exec ms_purgeolddata @date 20050101
exec ms_purgeolddata @date=20050101
exec ms_purgeolddata 20050101
exec ms_purgeolddata @date 200501301 00:00:00
etc., and I keep getting "Error converting data type int to datetime." What I am doing wrong? Thanks for any help!