Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Function TTOD() in T-SQL
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
00988677
Message ID:
00988705
Vues:
47
SQL Server 2000 doesn't have date data type. You'll have to use datetime but drop time part.
-- Drop time part
SET @StartDate = DATEADD(dd,DATEDIFF(dd,0,@d1),0)
-- Drop time part and add 1 day
SET @EndDate = DATEADD(dd,DATEDIFF(dd,0,@d2),0) + 1
...
	WHEN myDate >= @StartDate AND myDate < @EndDate
BTW, SQL Server 2005 will have date data type.

>What is the equivalent in T-SQL SQL Server to the TTOD() VFP function ?
>
>I need to get only the date of a datetime field in a query to compare in a
>
> ... where myDate between TTOD(d1) and TTOD(d2)
>
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform