Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

SQL question.

Participant ,
Mar 07, 2007 Mar 07, 2007
I have a SQL statment that counts the time and displays the hours worked it perfect. The only problem I am haveinging is I want it to add all the hours worked into one total. Any Ideas on this?

I have tried SELECT Mar1start, Mar1end, DateDiff('n', Mar1start, Mar1end)/60 AS Hours AS Total
FROM March

but no luck.
TOPICS
Server side applications
206
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 08, 2007 Mar 08, 2007
LATEST
It's hard to say without knowing your table structure.
My immediate suggestion is to change your DateDiff to DATEDIFF(HOUR,
Mar1start, Mar1End) and drop the division.


"lands1ide" <webforumsuser@macromedia.com> wrote in message
news:esngk9$llp$1@forums.macromedia.com...
>I have a SQL statment that counts the time and displays the hours worked it
> perfect. The only problem I am haveinging is I want it to add all the
> hours
> worked into one total. Any Ideas on this?
>
> I have tried SELECT Mar1start, Mar1end, DateDiff('n', Mar1start,
> Mar1end)/60
> AS Hours AS Total
> FROM March
>
> but no luck.
>
> SELECT Mar1start, Mar1end, DateDiff('n', Mar1start, Mar1end)/60 AS Hours
> FROM March
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines