Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-04-03 : 09:59:38
|
| gu writes "Hello SQL Team, I am using DTS to transfer data from a table to another.While doing data transferring I hope to do some data mapping (by VBScript) in it. The problem is I hope to calculate "how many days" between 2 DATE fields (one is system current date, one is from source table field) in a table and put it into the destination table fieldmany many thanxEnvironment:MS SQL Server 2000 Enterprise EditionMS Windows 2000 Advance Server" |
|
|
yakoo
Constraint Violating Yak Guru
312 Posts |
Posted - 2002-04-03 : 10:02:05
|
you can use the DATEDIFF functionSELECT DATEDIFF(dd, GetDate(), source.DateField) as DayDifference FROM Source |
 |
|
|
|
|
|