Reply to Re: Set time for UTC

Your name:

Reply:


Posted by Roy Harvey on 10/13/78 11:54

On Thu, 03 Aug 2006 01:24:48 GMT, "Dan Guzman"
<guzmanda@nospam-online.sbcglobal.net> wrote:

>Whether or not one technique is cleaner than the other is fairly subjective
>but the DATEPART/DATEADD method Roy suggested probably will perform better
>than CONVERT.

I always used to strip off the time by converting to a character
string. I only learned the DATEADD/DATEDIFF approach recently from
reading the SQL Server newsgroups. I am told it is far more
efficient, but I am still trying to decide if it is readable. But I
have had to create some real messes with character strings and
DATEPART and such too.

I still haven't really accepted the simple date arithmatic: SET
@datetime2 = @datetime1 + 2 from your example. I know it works in
days, but I like the explicit unit DAY in DATEADD. I don't even
bother to use the abbreviations in DATEADD, DATEPART or DATENAME any
more, as I find the full word more explicit.

Roy

[Back to original 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

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