Re: error trying a date field
- From: "Daniel Crichton" <msnews@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 18 Nov 2005 10:07:11 -0000
Felix wrote on Tue, 15 Nov 2005 08:22:10 -0800:
> Hi there, right now i'm working with a VB6 project that connects to a
> SQLSERVER 2000 using a System DSN.
>
> I discovered a problem that, i hope you can help me.
>
> The problem is that, when i try to save a record with a date field - the
> date saved in database is 2 days more that the typed date. ALWAYS 2
> DAYS!!!
>
> Don't know why.
>
> In order to save a record to DB i try to use val = cdec(val), where val is
> a date value, and for strings values i just use val = "'" & val & "'", and
> so on... for diferent types of fields.
>
> Because i'm developing for a spanish environment i decided to convert
> dates in the right format ("dd/mm/yyyy") and try to have regional settings
> that match national language and location.
>
> If anybody can help me, please i will appreciate it.
First up, trying using the ISO date format - this way no matter what your
language settings at the client and server the dates should be interpreted
incorrectly. Use yyyymmdd for your date format. Also check the client PC's
date - if it's always consistently 2 days out, it sounds like the date on
the machine is wrong.
Dan
.
- Prev by Date: Re: Simple Question
- Next by Date: Using the column of a datatable as a paramter for a command object
- Previous by thread: Simple Question
- Next by thread: Using the column of a datatable as a paramter for a command object
- Index(es):
Relevant Pages
|
|