If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Date format in design
I am creating a DB to track invoices and in the future i would like to run
queiries or reports that would separate invoices from one month to the other. For instance, run a report that would group invoices dated within the month of april and group invoices within the month of may. Should i be using date format 00/00/0000 for this function? |
#2
|
|||
|
|||
Date format in design
You can use the Month function. For ex, Month([InvoiceDate]).
Steve "acss" wrote in message ... I am creating a DB to track invoices and in the future i would like to run queiries or reports that would separate invoices from one month to the other. For instance, run a report that would group invoices dated within the month of april and group invoices within the month of may. Should i be using date format 00/00/0000 for this function? |
#3
|
|||
|
|||
Date format in design
Let me be more specific. In order to run dates from one month against another
month, what format should the data entry be used ? 00/00/0000---can this format be keyed into the date field so groupings can be done per month? Thanks "Steve" wrote: You can use the Month function. For ex, Month([InvoiceDate]). Steve "acss" wrote in message ... I am creating a DB to track invoices and in the future i would like to run queiries or reports that would separate invoices from one month to the other. For instance, run a report that would group invoices dated within the month of april and group invoices within the month of may. Should i be using date format 00/00/0000 for this function? |
#4
|
|||
|
|||
Date format in design
On Sun, 31 May 2009 15:36:01 -0700, acss wrote:
I am creating a DB to track invoices and in the future i would like to run queiries or reports that would separate invoices from one month to the other. For instance, run a report that would group invoices dated within the month of april and group invoices within the month of may. Should i be using date format 00/00/0000 for this function? The date format is irrelevant in this issue. A Date/Time field is not stored in any particular format; instead it's stored as a double float count of days and fractions of a day (times) since midnight, December 30, 1899: ?now; cdbl(now) 5/31/2009 6:18:51 PM 39964.7630902778 You can use the builtin Access functions such as Month([InvoiceDate]) to extract just the month, or use a Totals query grouping by an expression like InvMonth: Format([InvoiceDate], "yyyy-mm") to get a text string such as 2008-12, 2009-01, 2009-02 which will sort chronologically and let you group by month. -- John W. Vinson [MVP] |
#6
|
|||
|
|||
Date format in design
Thanks John. What i am trying to accomplish is the separate the invoices that
were from last month from this current month so i know which month charges were incurred. Using the string in query "yyyy-mm" is it possable for results to show as day mnth year? "John W. Vinson" wrote: On Sun, 31 May 2009 15:36:01 -0700, acss wrote: I am creating a DB to track invoices and in the future i would like to run queiries or reports that would separate invoices from one month to the other. For instance, run a report that would group invoices dated within the month of april and group invoices within the month of may. Should i be using date format 00/00/0000 for this function? The date format is irrelevant in this issue. A Date/Time field is not stored in any particular format; instead it's stored as a double float count of days and fractions of a day (times) since midnight, December 30, 1899: ?now; cdbl(now) 5/31/2009 6:18:51 PM 39964.7630902778 You can use the builtin Access functions such as Month([InvoiceDate]) to extract just the month, or use a Totals query grouping by an expression like InvMonth: Format([InvoiceDate], "yyyy-mm") to get a text string such as 2008-12, 2009-01, 2009-02 which will sort chronologically and let you group by month. -- John W. Vinson [MVP] |
#7
|
|||
|
|||
Date format in design
On Sun, 31 May 2009 17:37:01 -0700, acss wrote:
Thanks John. What i am trying to accomplish is the separate the invoices that were from last month from this current month so i know which month charges were incurred. Using the string in query "yyyy-mm" is it possable for results to show as day mnth year? Again: The format of the date field in the table IS ABSOLUTELY IRRELEVANT. It does not come into the problem. You can use a criterion = DateSerial([Enter year:], [Enter month number:], 1) AND DateSerial([Enter year:], [Enter month number:] + 1, 1) There are some other possible options, such as using a Calendar control on a form. Depends on how your user interface is set up. -- John W. Vinson [MVP] |
Thread Tools | |
Display Modes | |
|
|