Recent content by imtheodore

  1. I

    Length of Stay in Days from datetime

    I pretty sure I figured it out, in case anyone else ever needs it... CEILING((DATEDIFF(minute, admitdatetime, dischargedatetime) / 60.0) / 24.0)
  2. I

    Length of Stay in Days from datetime

    Problem #2 for me, I have read-only access to the db, I cannot create stored procedures. It makes my life miserable. But I'll copy this for use in my other projects where I have full access.
  3. I

    Length of Stay in Days from datetime

    That's ok, thanks for trying! I'll eventually figure it out..
  4. I

    Length of Stay in Days from datetime

    I cannot use the "Format" commend in SQL
  5. I

    Length of Stay in Days from datetime

    That formula calculates 1 for Admit 2013-01-01 00:36:00.000 Discharge 2013-01-02 16:03:05.700 The answer should be 2 since the timeframe is between 24-48 It seems like it should be easy, but I'm stumped...
  6. I

    Length of Stay in Days from datetime

    I have an admitdatetime----->01/01/2013 00:22:00 and dischargedatetime ---->01/09/2013 22:56:29 I need to calculate the number of days between the two, when I use (datediff (d, admitdatetime,dischargedatetime) I only get the correct number of days a small number of times 0-14 hours = 1 day...
  7. I

    Return Values to Right AND Left of Delimiter

    I have a large text field I would like to pull out the time from. The field contains a long written response and makes use of a time in the text. The time in in the format 00:00. I need to pull the time out of the text. I am able to use substring to pull the :00, but I cannot figure out how...
  8. I

    Subform locked records...

    I have a subform which is a collection of payroll dates/hours When the user goes in add their time for the new week I lock the previous weeks records by: DoCmd.GoToRecord , , acNewRec This works great, but.... if the user begins to add their time and accidently hits too many tabs or hits...
  9. I

    Rows to columns

    How can I conver the output of the attached table to this format: .........1/1/2010 1/2/2010 1/3/2010 1/4/2010.....4/30/2010 A4749 10 12 10 8 A3412 8 10 10 10 I need to view the schedule across the page so I can display it on a web page... The number of logins and the dates are infinite, so...
  10. I

    Query to return column form other query

    Thanks guys, I figured it out using cursors. In case anyone esle has this problem, I'll post my Procedure: CREATE PROCEDURE [dbo].[Build_Grid] @First_Date_Parameter datetime, @Second_Date_Parameter datetime AS SET NOCOUNT ON Truncate Table Grid_Date DECLARE @login NVARCHAR(30) DECLARE...
  11. I

    Query to return column form other query

    Not sure if you can understand this but I'll try... I need to write a stored procedure that runs a query and I need the result of that query (which will always be one record) to be the criteria for the next query Example... select user form logins where logindate between day1 and day2...
  12. I

    Is this possible???

    Maybe the easiest way to ask for help is show a table of what I have and my results. I was able to make the table into 3 columns, Cdate, OnPhone,OffPhone. This sample uses only one date. I need to know who is on the phone and when each hour in a 24 hour format. For example I need to display...
  13. I

    Is this possible???

    Ok, this has brought on a a new problem... What would be the best way to convert 2008-12-29 08:50:00 into a 24 hour format time without the date? I'm using convert(varchar(2),onphone,8) as onphone So I cannot DATEADD to a varchar
  14. I

    Is this possible???

    You are correct, I may have to make 48 time calculations based on each half hour...Hopefully I don't have to do 15 minute increments... How can I subtract 30 minutes from a value?
  15. I

    Is this possible???

    Ok, I've gotten a bit further, I created a start and end time for each call. I can now visually display the data, but I need help totaling the number of x's in each column (hour). select phonedate, case When 0 Between onphone And offphone then 'x' else '' end as [0], case When 1 Between...
Top Bottom