Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Datetime fields in MSSQL as Date in VFP
Message
From
07/12/2009 23:50:38
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01437969
Message ID:
01438004
Views:
41
Hmm, I could have sworn there was a date part to datepart but I just looked it in my help and there is not. I also looked at DATEFORMAT( now(), 'Mm/dd/yyyy' ) as ddate but that value is returned as a char(). I do most of my work with a Sybase database that is tsql compatible but there are some differences. Not sure if dateformat() is available in MSSql.


>>Hi Yew,
>>
>>in addition to James' suggestion of using datepart in the query, SQL2008 does in fact have a date column type: http://www.sqlteam.com/article/using-the-date-data-type-in-sql-server-2008. Since you are using SPT, you are probably not updating the cursor (by setting the cursor properties to support buffering, etc.), so datepart ought to work for you.
>>
>>hth,
>>
>>Hank
>>
>Hank,
>
>How are you suggesting to use datepart in this query?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform