Help with a DATETIME query please!

2005-04-19 Thread shaun thornburgh
Hi, I am trying to create a query that returns a users availability for the next ten days using version 4.1.11. A user has 8.5 hours available per day so a users availability is equal to 8.5 less any bookings they have on that day. I have a table called Bookings (see below), and each 'Booking' h

RE: Help with a DATETIME Query Please Using 3.23.54

2004-11-04 Thread Mike Johnson
From: shaun thornburgh [mailto:[EMAIL PROTECTED] > Hi, > > The following query works out the amount of hours a user has > been booked for on a particular day: > > SELECT > (SUM(((DATE_FORMAT(B.Booking_End_Date, "%k") * 60 ) + > DATE_FORMAT(B.Booking_End_Date, "%i")) - > ((DATE_FORMAT(B.Booking

Help with a DATETIME Query Please Using 3.23.54

2004-11-04 Thread shaun thornburgh
Hi, The following query works out the amount of hours a user has been booked for on a particular day: SELECT (SUM(((DATE_FORMAT(B.Booking_End_Date, "%k") * 60 ) + DATE_FORMAT(B.Booking_End_Date, "%i")) - ((DATE_FORMAT(B.Booking_Start_Date, "%k") * 60 ) + DATE_FORMAT(B.Booking_Start_Date, "%i")))

Re: Help with a DATETIME Query PLEASE!

2003-10-10 Thread Rory McKinley
ot; <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, October 10, 2003 12:37 PM Subject: Help with a DATETIME Query PLEASE! > Hi, > > I have a table called Bookings which has two important columns; > Booking_Start_Date and Booking_End_Date. These columns are both

Help with a DATETIME Query PLEASE!

2003-10-10 Thread shaun thornburgh
Hi, I have a table called Bookings which has two important columns; Booking_Start_Date and Booking_End_Date. These columns are both of type DATETIME. The following query calculates how many hours are available between the hours of 09.00 and 17.30 so a user can see at a glance how many hours th

RE: Help With a DATETIME Query PLEASE!

2003-10-08 Thread Dathan Vance Pattishall
40688 -->-Original Message- -->From: shaun thornburgh [mailto:[EMAIL PROTECTED] -->Sent: Wednesday, October 08, 2003 1:52 AM -->To: [EMAIL PROTECTED] -->Subject: Help With a DATETIME Query PLEASE! --> -->Hi, --> -->I have a table called Bookings which has two important co

Re: Help With a DATETIME Query PLEASE!

2003-10-08 Thread Ben Edwards
On Wed, 2003-10-08 at 09:52, shaun thornburgh wrote: > Hi, > > I have a table called Bookings which has two important columns; > Booking_Start_Date and Booking_End_Date. These columns are both of type > DATETIME. The following query calculates how many hours are available > between the hours of 09

Help With a DATETIME Query PLEASE!

2003-10-08 Thread shaun thornburgh
Hi, I have a table called Bookings which has two important columns; Booking_Start_Date and Booking_End_Date. These columns are both of type DATETIME. The following query calculates how many hours are available between the hours of 09.00 and 17.30 so a user can see at a glance how many hours they h