Hi guys! If I have a specific date like 11/04/2019 and how to add 6 more days so how should I get this date: 17/04/2019?
Thanks!
Hi guys! If I have a specific date like 11/04/2019 and how to add 6 more days so how should I get this date: 17/04/2019?
Thanks!
Hi @phoenix123 you can do like this
out_date = DateTime.ParseExact(“11/04/2019”,“dd/MM/yyyy”,system.globalization.CultureInfo.InvariantCulture).Adddays(+6)
where out_date is of type datetime
to get this as string do like
DateTime.ParseExact(“11/04/2019”,“dd/MM/yyyy”,system.globalization.CultureInfo.InvariantCulture).Adddays(+6).ToString
Is that working buddy @phoenix123
@Palaniyappan hey buddy I am still working on it around 5 mins let u know again?
@Palaniyappan hey buddy if my date like 11/04/2019 is store in a variable, will it still work?
Yes @phoenix123 if is stored in variable mention like this
DateTime.ParseExact(datetimevariable.ToString,“dd/MM/yyyy”,system.globalization.CultureInfo.InvariantCulture).Adddays(+6)
not able to see any image @phoenix123
hey buddy I have installed the system.globalization but I don’t why suddenly got this error
the datetwo is in generic type change it to datetime type in variable panel
@Palaniyappan system.datetime you mean?
yes buddy
@Palaniyappan hey buddy thanks for your fast response but I will try running the sequence then I will let you is success or not.
Yah sure. @phoenix123 …waiting
Cheers
@Palaniyappan hey buddy yes is adding the date correctly but how come I get 04/17/2019 and 00:00:…? can we filter away?
I didn’t get you can
you come again elaborately
Hi,
Adding to what @Palaniyappan said, datevalue.toshortdatestring.
This will give you only the date excluding the time hh:mm:ss
Let us know if this helps,
Regards,
Pavan H
This is how it is @phoenix123
Convert.ToDatetime(DateTime.ParseExact(datetimevariable. ToString ,“dd/MM/yyyy”,system.globalization.CultureInfo.InvariantCulture).Adddays(+6).ToString)
does that work buddy
@Palaniyappan I realized the mistake I made yup the previous solution is correct my bad and really thanks for your help again! @pavanh003 thank you sir for your suggestion!
Cheers
Keep going