Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Linked Servers and FoxPro

Status
Not open for further replies.

majorbroncosfan

Programmer
Joined
Feb 23, 2001
Messages
121
Location
US
I have successfully implemented a linked server via SQL Server for FoxPro. I'm having a problem, however, using the GOMONTH function for FoxPro, using the following statement to add one year to the current date field:

GOMONTH(DTOC(startdate), 12)

The startdate field is in a datetime format, containing the date and the time. I'm using the DTOC in order to change that and adding 12 months to that date. Are there any suggestions?

 
Gomonth will not work on a character field which is what you have after running dtoc (date to char).

use gomonth(startdate,12) gomonth will convert from datetime to date automatically.
 
Actually, I tried that and it still comes up with a datetime field. Is there any way to truncate only the date portion from that statement?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top