Q:get current date and then create date range 
Author Message
 Q:get current date and then create date range

    I want to be able to get the current date and based upon that date
create a date range for a report.

    Example:

    'Get Current Date
    TxtCurrentDate.Text=Date

    'Based upon current date, create date range for report
    'If TxtCurrenctDate.Text=2/8/98 then create a report range of 2/1/98
to 2/28/98
    ?

Jereme



Thu, 18 Jan 2001 03:00:00 GMT  
 Q:get current date and then create date range
Don't worry about the days.  Use the month.

i.e.  If Feb select all records with month Feb.

or set up the following

dim dTempDate as Date
dim dFromDate as Date
dim dToDate as Date

dTempDate = Format (date, "mm")

Select Case dTempDate

Case 1
    dFromDate = "01/01/" & format (dTempDate , "yy")
    dToDate = "31/01/" & format (dTempDate , "yy")

and so on

Get the idea?

Cheers
CW

Quote:

>    I want to be able to get the current date and based upon that date
>create a date range for a report.

>    Example:

>    'Get Current Date
>    TxtCurrentDate.Text=Date

>    'Based upon current date, create date range for report
>    'If TxtCurrenctDate.Text=2/8/98 then create a report range of 2/1/98
>to 2/28/98
>    ?

>Jereme



Fri, 19 Jan 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. date range to current date at specific time syntax question

2. VBA date query - not getting current date

3. Create Date array using Date range

4. Crystal Reports 8.5 date range parameter field - record selection that includes null date range

5. Date within a Range of Dates

6. Getting a drop down resource list when filtering by resource and date range

7. Date Difference to Return the most Current Date

8. Changing a Calculate field (Date) depending on Current date

9. Any code for current date to Julian date samples

10. Getting the current date when the ChangeDate event fires

11. getting the current date from the server ?

12. DATES ISSUE: Number of the current Week of the current Month

 

 
Powered by phpBB® Forum Software