Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fechas en VFP / SQL Server
Message
 
 
To
03/10/2005 15:14:33
Humberto Ramirez
H. Ayuntamiento de Colima
Colima, Mexico
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01055589
Message ID:
01055600
Views:
22
Te recomiendo utilizar el formato ANSI para las fechas, de esa forma no importa la configuración regional del PC.

Recuerda que SQL Server no almacena la fecha en ningun AMD o DMA sino en formato ANSI.

Para solucionar este problema lo mejor utilizar el formato ANSI, el cual dice que las fechas se manejaran así: 'YYYYMMDD HH:mm:ss'. Es decir desde VFP si quiere enviar una a SQL Server lo hará así: Dtos(Date()), de esta forma la fecha quedará como cadena y no importa que configuración regional tiene su equipo o el servidor.

Ejemplo:

Select * from tabla Where campo >='20040805'
David Amador Tapia
WebMaster "La Web de Davphantom"
www.davphantom.net
Cartagena. Colombia
Previous
Reply
Map
View

Click here to load this message in the networking platform