Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Server DateTime and Visual FoxPro
Message
De
09/03/2004 17:50:57
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00883463
Message ID:
00884609
Vues:
15
Another variation.
TEXT TO lcSelectCmd NOSHOW TEXTMERGE
SELECT * FROM   tblContactUs
WHERE CONVERT(varchar(50), tblContactUs.[sysdate], 101) BETWEEN CONVERT(varchar(50), ?lBegDate, 101) AND CONVERT(varchar(50), ?lEndDate, 101)
ENDTEXT
Anthony

>>> Is there a “better” or different way to do this?
>>
>>All of the dates have a timestamp of 12:00:00 AM, right? If your date range parameters are of type Date, SQL will stick 12AM in as the time. So you shouldn't have to worry about the time at all for comparison-sake. Everything will be 12AM.
>>
>>BTW -- if you define the field type in the view as a "D" instead of "T", then VFP will just give you the date portion in the view.
>
>Dan;
>
>My problem is I am pulling data from SQL Server 2000 which is updated by an ASP application, using DateTime. Say I want to find all records created today. If I create a record after 12:00:00 AM my begin date has to be the day of interest and my end date has to be the following date. For a range of dates the end date has to be one day after the date of interest.
>
>This report application is going to be used on a production line so I do not think they will have time to remember that! :)
>
>My original solution works for now but I will still look for a different way to do it.
>
>Tom
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform