August 23, 2006 at 2:05 pm
i have a tab delimeted file with dates....the dates are in format mm/dd/yyyy
now, when i import it into SQL Server, I want to be able to use the dates in a mathematical way. For example, I want to be able to see how many x has occurred since a date.
I assume I need to change it from varchar and also modify it to yyymmdd format. Am I right?
What's the best way?
August 23, 2006 at 3:44 pm
In most cases it's best to store date data in datetime columns.
Transform the data to datetime data type (DTS can do this) and use date functions such as datediff to work with it in T-SQL.
Greg
Greg
August 23, 2006 at 4:02 pm
Thanks. Where's a good place to learn about working with dates, using datediff, etc.?
August 24, 2006 at 3:57 am
I would say BOL is the best place
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy