Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hour from datetime
Message
De
12/11/2013 12:40:24
 
 
À
12/11/2013 12:37:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01587834
Message ID:
01587838
Vues:
51
>>>the following code in a SQL interrogation always return "0-12"
>>>
>>>
>>>IIF( (HOUR( TTOD( Table1.datecreation)) >=0  AND HOUR( TTOD( Table1.datecreation)) <= 11), "0-12", IIF( (HOUR( TTOD( Table1.datecreation)) >= 12 AND HOUR( TTOD( Table1.datecreation)) <= 15), "12-16", "16-24")) as HourBlock
>>>
>>>
>>>Data contains hours in all the range 0-24. So I should have some "12-16" and "16-24"
>>>
>>>You guys see something that I don't?
>>
>>What's Set('hour')? Hint: it should be 24 in your case.
>
>I thought about it but the help says that "set hours" doesn't make a difference.

I don't see that in help, may I ask where you see it? Anyway, I would try Set Hour = 24 and see what happens to your query.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform