SQL - DateAdd(dd, - day(getdate()),getdate())
need to convert this into VB.net
Thanks,
Rajesh G
try this
using Microsoft.VisualBasic
DateTime dtNew = DateAdd(DateInterval.Day, DateTime.Now.Day-(DateTime.Now.Day*2), DateTime.Now);
hope this helps...
Not sure I understood the sql statement but if you're trying to get last day of the previous month I think this works.
DateAndTime.DateAdd(DateInterval.Day, -DateAndTime.Today.Day, Today)
Like this..
DateTime dt = DateTime.Now; dt = dt.AddDays(-(dt.Day));