Link to home
Start Free TrialLog in
Avatar of VBdotnet2005
VBdotnet2005Flag for United States of America

asked on

Date format

Is there a way to set date as the beginning of the month like 02/01/2015. Right now it 2/01/2015.


ASPxDateEdit_start_date.Date = DateSerial(Today.Year, Today.Month, 1) 

Open in new window

Avatar of Fernando Soto
Fernando Soto
Flag of United States of America image

Hi VBdotnet2005;

Is this what you are looking for?

Dim firstOfMonth = DateTime.Today.AddDays(-(DateTime.Today.Day - 1))

Open in new window

Avatar of VBdotnet2005

ASKER

It returns 2/1/2015. Can we do it in 02/01/2015?
ASKER CERTIFIED SOLUTION
Avatar of Fernando Soto
Fernando Soto
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you again Fernando
Not a problem VBdotnet2005, glad to help.