Information générale
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Network:
Windows 2008 Server
>>>There is also an HOUR() function, and numeric hour never exceeds 23, so you could use IF HOUR( TIME( ) ) = 23 in place of your current construct.
>>
>>not really - that should give function argument... invalid. Hour(Datetime()) much better ;-)
>
>Good catch... the one time I post w/o testing :(
just be proud to know that your personal murphy field is working a-ok - and please tell me you don't pre-test all your OS install posts ;-)
best way from CPU/machine POV probably would be to compare seconds() to a precalculated property - but that piece of code just does not look perf dangerous, so the most readable code to the maintainer probably is the "right" code, and your approach is the one easier to grok - at least to my reading style.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement