You are here: Re: strange problem with dates « MsSQL Server « IT news, forums, messages
Re: strange problem with dates

Posted by MC on 07/11/05 13:23

You probably have a problem with dateformat. It is probably in a year, day,
month format and there isn't 15 months in a year :).

try this:

insert into calendar
tema, pol_1, dodal, date_from, date_to, user_id, status) Values ('test' ,
'test' , 1, '2005-09-08 12:00:00', '2005-15-08 12:00:00', 2, 0 )

or setting the format on and then inserting:


SET DATEFORMAT ymd

insert into calendar
(tema, pol_1, dodal, date_from, date_to, user_id, status)
Values ('test' , 'test' , 1, '2005-08-09 12:00:00', '2005-08-15 12:00:00',
2, 0 )




MC


"Zibi" <nospam@won.com> wrote in message
news:datfo0$bn3$1@nemesis.news.tpi.pl...
> Sometimes I get error : "The conversion of char data type to smalldatetime
> data type resulted in an out-of-range smalldatetime value. "
> If I look on SQL there is ok example with error - insert into calendar
> (tema, pol_1, dodal, date_from, date_to, user_id, status) Values ('test' ,
> 'test' , 1, '2005-08-09 12:00:00', '2005-08-15 12:00:00', 2, 0 )
>
> Example no error - insert into calendar (tema, pol_1, dodal, date_from,
> date_to, user_id, status) Values ('test' , 'test' , 1, '2005-01-01
> 12:00:00', '2005-01-01 16:00:00', 1, 0 )
> What is bad?
>
>
> Regards,
>
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация