Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's to like about a datetime
Message
From
06/09/2018 18:28:00
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., New Zealand
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
MS SQL Server
Miscellaneous
Thread ID:
01661714
Message ID:
01661864
Views:
49
Select myDate
from DateTester
where myDate like '2018-01%'
order by myDate;
You'll also get zero records from this, unless you've changed SQL Server's implicit cast. Try LIKE 'Jan % 2018%'

I've never had issues with BETWEEN using datetimes and paremeterized queries. FWIW. If ticks ever did become an issue, I'd follow your mechanism re date, incrementing the upper boundary and using < if necessary.
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us.
"
-- Shakespeare: Coriolanus, Act 1, scene 1
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform