1. D

    Query Summarizing Records by Week

    I have a table TTimeRecords with records including DateofJob and HoursofWork. DateofJob | HoursOfWork 1/1/19 | 6.0 1/2/19 | 8.0 1/2/19 | 6.0 1/3/19 | 7.0 1/3/19 | 8.0 I then wanted to create a query in which hours were summarized for 2019 on a weekly basis, with...
  2. B

    Datepart alternative

    Hi all I am sure there is a simple answer, as always, but I just cant figure it out. I would like to return just the days of a date so for example today (03/10/2011 or 10/03/2011 for those of you in the US)...when I use the Datepart function below Day = DatePart("D", Date) It returns...
  3. I

    date LastSixMonth

    Hiya, The following function pulls the A DayBefore of the Last Monday. DateAdd("d",-((DatePart("w",Now())-2)),Now()-8) = 03-July-2011 Problem Now I would like to use the same function and pull exact date of last 6month i.e. 03/01/2011? Thanks for you help! Regards FArhan...
  4. M

    VBA Dates

    Ok, I am trying to create a custom variable with data pulled from other variables but I can't get excel to accept it. I keep getting a type mismatch but can't figure out how to get past it Public StartDate As Date StartDate = "11/1/2010" Dim Month As String Month = DatePart("M", StartDate)...
  5. I

    DatePart- function "Quarter"

    Hi If I'm right we are in Quarter =1 ,so why my following query brings the result quarter=2 ? Select DatePart("q",Now()) AS Financial_Quarter, "01/04/" & IIf(DatePart("q",Now())=1,Year(Now())-1,Year(Now())) As Fi FROM Table_Name Ans= 2 ? Thanks in advance Many thanks Farhan
  6. J


    I am trying to group records 3 ways in Visual Studio for an excel spreadsheet, by hour, week and month. I have currently have to break apart the date column with a dateadd statement, as my columns that have the times contain a unix date time. I need to make a new column with the dateadd and...
  7. J

    DatePart in IIF statement

    I am trying to run a query that will generate a fiscal year based on a date in a table (called fin_month). If the month portion of the date selected is between 10 and 12, I need the year to be +1 (goverment fiscal year). If the month portion is between 1 and 9, then I just need the year. I've...

Some videos you may like

This Week's Hot Topics