Need logic either switch case or if conditions
Switch case is better
Please find attachment for more details
Please give me conditions,
I received process date in string format
MM/DD/yyyy
Thanks and regards,
Vicky
Need logic either switch case or if conditions
Switch case is better
Please find attachment for more details
Please give me conditions,
I received process date in string format
MM/DD/yyyy
Thanks and regards,
Vicky
Hi @Vicky_K
You can use a FlowChart to achieve the same.
→ DateTime.Now.AddDays(10).ToString("MM/dd/yyyy") = Now.ToString("MM/dd/yyyy")
Use the above expression to formulate the specific conditions and design the flow.
Hope this helps,
Best Regards.
Hi
I think IF condition in sequence is much easier with this or go for a FLOW DECISION in a flowchart
Let’s take IF condition like this
Datetime.ParseExact(yourdatestring.ToString.Substring(0,10), “MM/dd/yyyy”, System.Globalization.CultureInfo.InvariantCulture).AddDays(10).ToString(“dd/MM/yyyy”).Equals(Datetime.Now.ToString)
If true it goes to then block where u can send the mail or goes to else block where use another IF condition like this
Datetime.ParseExact(yourdatestring.ToString.Substring(0,10), “MM/dd/yyyy”, System.Globalization.CultureInfo.InvariantCulture).AddDays(20) >= (Datetime.Now)
AND
Datetime.ParseExact(yourdatestring.ToString.Substring(0,10), “MM/dd/yyyy”, System.Globalization.CultureInfo.InvariantCulture).AddDays(30) <= (Datetime.Now)
If true it goes to then block where send mail or goes to else block where use another IF condition like this
Datetime.ParseExact(yourdatestring.ToString.Substring(0,10), “MM/dd/yyyy”, System.Globalization.CultureInfo.InvariantCulture).AddDays(30) > (Datetime.Now)
If true it goes to then block where send the mail or goes to else block where keep it empty to ignore it
Cheers @Vicky_K
@Vicky_K
In addition to some inputs from above we would recommend:
Instead of falling down to nested if/else parts or others we can also use the following technique:
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.