Between exact dates or perhaps not

  • Thread starter Thread starter an
  • Start date Start date
A

an

To obtain records between two exact dates I use, in Date
column:
=[First date] AND <=[Last date]

And if I need to obtain records only with First date, or
Last date, please?

Thanks in advance.
an
 
to find records only with first date or last date you would use...

[firstdate] or [lastdate]


Rick B


To obtain records between two exact dates I use, in Date
column:
=[First date] AND <=[Last date]

And if I need to obtain records only with First date, or
Last date, please?

Thanks in advance.
an
 
Sorry,

I don't know, but why not work with me?...

an
-----Original Message-----
to find records only with first date or last date you would use...

[firstdate] or [lastdate]


Rick B


To obtain records between two exact dates I use, in Date
column:
=[First date] AND <=[Last date]

And if I need to obtain records only with First date, or
Last date, please?

Thanks in advance.
an


.
 
Huh?

Sorry,

I don't know, but why not work with me?...

an
-----Original Message-----
to find records only with first date or last date you would use...

[firstdate] or [lastdate]


Rick B


To obtain records between two exact dates I use, in Date
column:
=[First date] AND <=[Last date]

And if I need to obtain records only with First date, or
Last date, please?

Thanks in advance.
an


.
 
Yes...

Work fine with:

Between [First date] And [last date]

Now, with arbitrary first date only or arbitrary last date
only, I don't know how to make...
Already I tried with wildcards but don´t work too.

Thank you.
an
-----Original Message-----
Huh?

Sorry,

I don't know, but why not work with me?...

an
-----Original Message-----
to find records only with first date or last date you would use...

[firstdate] or [lastdate]


Rick B


To obtain records between two exact dates I use, in Date
column:
=[First date] AND <=[Last date]

And if I need to obtain records only with First date, or
Last date, please?

Thanks in advance.
an


.


.
 
Hi,

If you have date AND time, add 1 day (24h) to the last date since, as
example, today at 6:00AM is AFTER today, at 00:00:00 (and by default, your
date is at 00:00:00 ).


Hoping it may help,
Vanderghast, Access MVP

Yes...

Work fine with:

Between [First date] And [last date]

Now, with arbitrary first date only or arbitrary last date
only, I don't know how to make...
Already I tried with wildcards but don´t work too.

Thank you.
an
-----Original Message-----
Huh?

Sorry,

I don't know, but why not work with me?...

an
-----Original Message-----
to find records only with first date or last date you would use...

[firstdate] or [lastdate]


Rick B


To obtain records between two exact dates I use, in Date
column:
=[First date] AND <=[Last date]

And if I need to obtain records only with First date, or
Last date, please?

Thanks in advance.
an


.


.
 
Yes...

Work fine with:

Between [First date] And [last date]

Now, with arbitrary first date only or arbitrary last date
only, I don't know how to make...
Already I tried with wildcards but don´t work too.

Wildcards apply to Text fields, not to date/time fields.

One criterion I will use is:

([datefield] >= [First date] OR [First date] IS NULL)
AND
([datefield] <= [Last date] OR [Last date] IS NULL)

If the user enters only [First date] they will see all records more
recent than that date; if they enter only [Last date] they'll see all
records earlier than that date; if they enter both, they'll see only
records in between; if they enter neither, they'll see all records in
the table.
 
Simply...
PERFECT!

Thank you very much.
an
-----Original Message-----
Yes...

Work fine with:

Between [First date] And [last date]

Now, with arbitrary first date only or arbitrary last date
only, I don't know how to make...
Already I tried with wildcards but don´t work too.

Wildcards apply to Text fields, not to date/time fields.

One criterion I will use is:

([datefield] >= [First date] OR [First date] IS NULL)
AND
([datefield] <= [Last date] OR [Last date] IS NULL)

If the user enters only [First date] they will see all records more
recent than that date; if they enter only [Last date] they'll see all
records earlier than that date; if they enter both, they'll see only
records in between; if they enter neither, they'll see all records in
the table.

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public
.
 
Certainly.
Many thanks too.

an
-----Original Message-----
Hi,

If you have date AND time, add 1 day (24h) to the last date since, as
example, today at 6:00AM is AFTER today, at 00:00:00 (and by default, your
date is at 00:00:00 ).


Hoping it may help,
Vanderghast, Access MVP

Yes...

Work fine with:

Between [First date] And [last date]

Now, with arbitrary first date only or arbitrary last date
only, I don't know how to make...
Already I tried with wildcards but don´t work too.

Thank you.
an
-----Original Message-----
Huh?

Sorry,

I don't know, but why not work with me?...

an
-----Original Message-----
to find records only with first date or last date you would use...

[firstdate] or [lastdate]


Rick B


To obtain records between two exact dates I use, in Date
column:
=[First date] AND <=[Last date]

And if I need to obtain records only with First date, or
Last date, please?

Thanks in advance.
an


.


.


.
 
One method


Between Nz([First date],[Last Date]) And Nz([Last date],[First Date])

IF Both Date parameters are filled, you get records between the two dates.
If only one date parameter is filled, you get records for that exact date.

If you date field also includes times, then you need to make further
modifications to this.
Yes...

Work fine with:

Between [First date] And [last date]

Now, with arbitrary first date only or arbitrary last date
only, I don't know how to make...
Already I tried with wildcards but don´t work too.

Thank you.
an
-----Original Message-----
Huh?

Sorry,

I don't know, but why not work with me?...

an
-----Original Message-----
to find records only with first date or last date you would use...

[firstdate] or [lastdate]


Rick B


To obtain records between two exact dates I use, in Date
column:
=[First date] AND <=[Last date]

And if I need to obtain records only with First date, or
Last date, please?

Thanks in advance.
an


.


.
 
Ok.

Thanks for idea!
an
-----Original Message-----
One method


Between Nz([First date],[Last Date]) And Nz([Last date], [First Date])

IF Both Date parameters are filled, you get records between the two dates.
If only one date parameter is filled, you get records for that exact date.

If you date field also includes times, then you need to make further
modifications to this.
Yes...

Work fine with:

Between [First date] And [last date]

Now, with arbitrary first date only or arbitrary last date
only, I don't know how to make...
Already I tried with wildcards but don´t work too.

Thank you.
an
-----Original Message-----
Huh?

Sorry,

I don't know, but why not work with me?...

an

-----Original Message-----
to find records only with first date or last date you
would use...

[firstdate] or [lastdate]


Rick B


message
To obtain records between two exact dates I use, in Date
column:
=[First date] AND <=[Last date]

And if I need to obtain records only with First date, or
Last date, please?

Thanks in advance.
an


.



.
.
 
Back
Top