Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's to like about a datetime
Message
From
07/09/2018 09:34:29
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
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:
01661871
Views:
45
>>
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%'
>
>No, it works for me in MSSQL 2017 using the like '2018-01%'. Gets the records that are for January.
>
>>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.
>
>Well, Cetin is correct when the datatypes are not Date and are some kind of Datetime instead. I wouldn't risk it.

Glad, at least someone could see what I am saying.
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform