Re: error trying a date field



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


.



Relevant Pages

  • Re: Can I AutoSize (or Fit) merged, variable data within a text bo
    ... i have had to manually format my pages as they ... "Peter Jamieson" wrote: ... The problem became a problem when my client decided that they no ... PrintShop Mail is made for this kind of gig ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Exchange 2003 Performance issues with Entourage Clients
    ... the format the client retrieves/submits it. ... "working directory" or the system temp directory. ... users on the store, I'm guessing it's the IO for content conversion in the ...
    (microsoft.public.exchange.admin)
  • RE: I cant get data into a column type format needed
    ... somehow it is not quite working for me in the format I ... client information. ... and the supervisor name of that SC. ... Service Coordinator they belong ...
    (microsoft.public.access.reports)
  • Re: embeds vs attachments
    ... only Outlook RTF format is the problem as only 2 mail clients can ... HTML has its own problems as many people routinely block HTML mail or use a ... client that cannot read HTML. ...
    (microsoft.public.outlook)
  • Re: Passing parameters from page to page in HTA app
    ... I just have to learn how to output to that format. ... >> When they select edit it should passs them into the next portion which ... >> itinerary for that event as well as add client names to the event. ... >> pass them to a third page to edit individual client itinerarys. ...
    (microsoft.public.scripting.jscript)