how to get date 1st day of month?
Hey there, in order to help you can you provide an example?
Your question is vague
Actually now.AddDays(-1).ToString(“dd.MM.yyyy”) this formula is get yesterday’s date
but I want 1st day of months date
what function should I use?
please use “date.Now.AddDays(-(date.Now.Day-1)).DayOfWeek.ToString” to get the first day of the month.
Below one will give you first day of Month.
DateTime dt = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1)
its working @Ajju but I want numeric date is it possible?
For ex: 01.05.2019
@Abubakkar use this
It’s working fine Thanks@buddy
How to get starting month of this year(2020)