Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hour from datetime
Message
From
12/11/2013 12:48:52
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01587834
Message ID:
01587841
Views:
57
lol... ttod was not supposed to be there. Thanks Sergey and Tore.

I was mixed up in my date conversion stuff.

>How do you expect to get hour from a date type value? It'll be always 0
>
>>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?
*******************************************************
Save a tree, eat a beaver.
Denis Chassé
Previous
Reply
Map
View

Click here to load this message in the networking platform