Using SQL, how can I convert a data in a datetime field to a date only data? When I run a job to collect data, I use the getdate() function that returns the date and time. I want to then convert this to the same date but with a time of 00:00:00. Please advise. Thanks! ~Gina
How can I convert an 8 digit numeric (format ccyymmdd) into a real datefield to be used in date arithmetics? I need to calculate the number of months between the month (current date) and a date represented in my DB as an 8 digit numeric with format "ccyymmdd". Therefor (I assume) I need to convert...
Hi - When I run this: select cast ('461129' as datetime) i get 2046-11-29 00:00:00.000 instead of 1946-11-29 00:00:00.000 Can you please let me know why and what I need to do in order to get the required results. thx