You are here: Re: time conversion hiccup « MsSQL Server « IT news, forums, messages
Re: time conversion hiccup

Posted by DonLi2006 on 09/18/07 15:58

Beautiful, thank you.

On Sep 18, 9:43 am, "Pall Bjornsson" <pa...@kvos.is> wrote:
> Hi !
>
> What I can see via quick read are two errors or mistakes.
>
> 1) Definition of a variable or result of type decimal(1), can store at the
> most one total number of digits both to the left and to the right of the
> decimal point, so you'll never get a result with anything more than a single
> digit number, even if the result should be 10 or more, in which case you
> should get an overflow error.
>
> 2) The division by the integer number 60 forces the operation to be an
> integer division, as you can easily see by executing this statement:
> select datediff(n,'08:00','14:25')/60,
>
> convert(decimal(1),datediff(n,'08:00','14:25')/60),
>
> datediff(n,'08:00','14:25')/60.0,
>
> convert(decimal(1),datediff(n,'08:00','14:25')/60.0)
>
> Hope this helps,
>
> Palli
>
> <DonLi2...@gmail.com> wrote in message
>
> news:1190084992.933315.305940@g4g2000hsf.googlegroups.com...
>
>
>
> > Hi,
> OP omitted
> - Show quoted text -

 

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

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