Re: Dates and time zones



I'm using VB.Net 2003.

The date is typed in a textbox and stored in a column (date datatype) in a
datatable, and further stored in a SQL Server database (also date datatype).
I checked via Query Analyzer and the date is correctly stored. So, when I
show that date in another machine, the problem occurs.

The date typed is 01/01/2006, although it happens with every date I save.




"Armin Zingler" <az.nospam@xxxxxxxxxx> wrote in message
news:umPyTDy$FHA.356@xxxxxxxxxxxxxxxxxxxxxxx
> "Cesar Ronchese" <ronchese_hotmail_dot_com> schrieb
>> Hello!
>>
>> I've built a program that show some dates to users. I got a problem
>> when users have different configured time zone machines, where:
>>
>> - One machine that determined time zone the date displayed is
>> 01/01/2006. - In other different machine (and other configured time
>> zone), the date displayed is 12/31/2006 19:00:00
>>
>> If I redefine the time zones of these two machines to the same, the
>> date works fine.
>>
>> I think this: if the date is registered as 01/01/2006, it should be
>> showed as 01/01/2006, independent of fix it in CultureInfo class. Or I'm
>> wrong?
>>
>> Why does this happen and how to resolve it?
>
>
> Which version of VB do you use? 2003 or 2005? I ask because DateTime now
> has
> a property 'Kind'. Apart from this: Where do you get the DateTime from?
> Where do you store it (type of variable)? How do you display it? What is
> the value in the variable?
>
>
> Armin
>


.



Relevant Pages

  • Re: Timestamping rows results in "12:00"?
    ... > Excel for example will display a datetime as just the date or just the time ... What is the datatype of the column and what tool are you using to ...
    (microsoft.public.sqlserver.server)
  • Re: Input Mask on Date for Year or Month Only
    ... If you wish to use the DateTime functions, then the field's datatype ... format, the stored value must contain the day as well. ... mm-yyyy format, i.e. 08/2008 or 08-2008. ...
    (microsoft.public.access.gettingstarted)
  • Bulk Insert - How to represent nulls in .txt input file?
    ... I have a table that I'm loading via .txt file input. ... One of the columns has a datatype of datetime. ... way to pass a null to a datetime field that allows nulls. ...
    (microsoft.public.sqlserver.dts)
  • Re: Converting and formatting DATE field
    ... SQLServer does not have a date only datatype, therefore it will store a time ... If you don't specify the time portion when the datetime is inserted ... > I would like to be able to format this date and show only ...
    (microsoft.public.sqlserver.programming)
  • Re: Input Mask on Date for Year or Month Only
    ... Can I use an input mask to caputre only the year or only the month? ... If you wish to use the DateTime functions, then the field's datatype ... format, the stored value must contain the day as well. ...
    (microsoft.public.access.gettingstarted)