Solved Impossible Dates

ProgramRasta

Member
Local time
Today, 21:26
Joined
Feb 27, 2020
Messages
98
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

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
 
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

Back
Top Bottom