CFD - Date & Time Condition > Date Range without specify the year

Status
Not open for further replies.

Arthur.b

Platinum Partner
Advanced Certified
Joined
Oct 27, 2020
Messages
51
Reaction score
10
Hello everyone,

In the 'Date & Time Condition' setting, there is the 'Date Range' option where we can specify a range of dates. Is it possible to achieve the same without specifying the year?

The goal is to have a different operation during the holiday season (from December 15th to December 31st).

Thank you in advance for your advice.
 
I'm afraid this cannot be modified. The exact date including the year will always be required to be selected.
 
  • Like
Reactions: edossantos
Thanks Theodoros,

Is someone have maybe create a c# code to make this condition ?
 
You are welcome ;)
 
Thanks Theodoros,

Is someone have maybe create a c# code to make this condition ?
It's relatively easy to do DateTime comparison in C#...
 
  • Like
Reactions: edossantos
This C# snippet will return true between Dec 15 and Dec 31 every year:
return DateTime.Now.Month == 12 && DateTime.Now.Day >= 15;
 
Here is a example of the result :

In that case, when you're in decembrer between the 15th and the 30th the C# code will return true, so the audio1 will be played.

1701098676425.png


example of use case : play a custom Welcome prompt playback during Christmas
 
  • Like
Reactions: edossantos
Status
Not open for further replies.

Members Online Now

Forum statistics

Threads
111,835
Messages
589,289
Members
164,666
Latest member
infinititravels