Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What's to like about a datetime
Message
De
24/08/2018 06:59:53
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
23/08/2018 19:17:28
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
MS SQL Server
Divers
Thread ID:
01661714
Message ID:
01661727
Vues:
55
>Dragan, I think you'll find this is a date convert to human readable string issue, depending on SQL Server defaults.
>
>No doubt you also considered a parameterized query that avoids string cast and gets cached for efficiency:
>
>
ltStart={^2015-01-01}
>ltend=dtot({^2016-01-01})-1
>
>select * from mytable where mydate between ?ltStart and ?ltEnd
That's what I routinely do... just had this weird idea that, since there are no date literals in TSQL - it uses strings for that - then it may treat a date as a string at least while parsing. And as Cetin pointed out, it actually does, it's just that the default format isn't american standard.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform