Solved Impossible Dates (1 Viewer)

ProgramRasta

Member
Local time
Today, 08:03
Joined
Feb 27, 2020
Messages
89
Hello All,

I am hoping for some assistance.

I am attempting to manipulate some dates with little success!

I have a query where I concatenate two dates, however, where there is an impossible date such as 31/11/2021 the query is falling over.

I would like for the query to do the following if possible:
  1. If the date is impossible go the next date - for example 31/11/2021 changes to 01/12/2021
  2. if the date is a non-weekday, make the date the next weekday
Thank you for taking the time to read the post.

Cat
 

Attachments

  • DatabaseDates.accdb
    384 KB · Views: 169

theDBguy

I’m here to help
Staff member
Local time
Today, 00:03
Joined
Oct 29, 2018
Messages
18,792
Hi Cat. For the impossible dates, you could try using the IsDate() function.

PS. If you want to change 31/11/2021 to 01/12/2021, then you can use the DateSerial() function.

PPS. Here's a screenshot for clarification.
1640108625541.png
 

ProgramRasta

Member
Local time
Today, 08:03
Joined
Feb 27, 2020
Messages
89
Hi Cat. For the impossible dates, you could try using the IsDate() function.

PS. If you want to change 31/11/2021 to 01/12/2021, then you can use the DateSerial() function.

PPS. Here's a screenshot for clarification.
View attachment 97035
Hello,

The DateSerial() was the answer!

This forum truly has the best contributors.

Many Thanks.

Cat.
 

Users who are viewing this thread

Top Bottom