You are here: Re: Calculate Days Worked « PHP Programming Language « IT news, forums, messages
Re: Calculate Days Worked

Posted by howzit on 06/14/07 21:43

On Jun 14, 2:23 pm, Michael Fesser <neti...@gmx.de> wrote:
> .oO(howzit)
>
> >I don't want to edit my SELECT statement - as his answer would
> >suggest.
>
> Why not? That would be the easiest and most reliable way.
>
> >I need the SELECT statement to stay as it is.
>
> Whenever possible you should let the database do all the dirty work.
> It's very good at handling things like date calculations and does it
> much more efficient than PHP.
>
> >I was hoping
> >for a function that would manipulate the one instance that I am
> >needing.
>
> In PHP you would have to turn the date into a Unix timestamp (strtotime)
> and calculate the difference to the current date. Two things might
> become an issue in some situations:
>
> * daylight saving time
> * Unix timestamp restrictions (1970-2038 on many systems)
>
> There's also a calendar extension in PHP for doing Gregorian and Julian
> date calculations, but this is not always available.
>
> So, as said, let the DB do it if possible.
>
> Micha

Sound advice - I do appreciate your input. I will give it a shot -
and post back my progress. Thanks!

 

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

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