Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Date subtraction question
Message
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Date subtraction question
Divers
Thread ID:
00673986
Message ID:
00673986
Vues:
70
I have the statement below and it doesn't create an error, but it doesn't "work" either. The goal is that I know when a room ends, I want to loop through a set of times, but the last loop must stop at when the room closes - the length of the possible case. So if the room closes at 1700 and the required length is 60 minutes, the last possible time should be 1600. I read the BOL and dateadd really seemed to be just for adding. The example of date subtraction in the BOL showed how to subtract a day, but not just minutes from the datetime.
set @iLength  = 60

while (@LoopDate < dateadd(mi,-@ilength,@EndDate))
Thanks
Kirk
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform