Assign value to a date variable without using AddDays

Hi ,

I want to assign a specific date to a date variable, please help me how to do it.

Say I want to assign a date somewhere in August - August 19 to a date variable how can I do that without using AddDays


You can directly assign a date value like below

[Data Type - DateTime] value = new DateTime(2019, 8, 12) [yyyy,mm,dd]

I am getting error when I use this, please check… THe variable is of type DateTime

[yyy,mm,dd] is to understand. Not required.

Use the below one -

new DateTime(2019, 8, 12)

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.