Take the first day of the month and the last day of the month ?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 1 of 1

Thread: Take the first day of the month and the last day of the month ?

Hybrid View

  1. #1
    Join Date
    Sep 2007
    Posts
    203

    Take the first day of the month and the last day of the month ?

    Get the first day of the month and the last day of the month ?

    Below is the error code

    // Get the first day of the month
    kptDTPickerTo.Format = DateTimePickerFormat.Short;
    kptDTPickerTo.Value = "01/" + DateTime.Today.Month + "/" + DateTime.Today.Year;//New Date(iYear, iMonth, 1);

    // Get last day of the month
    kptDTPickerFrom.Value = DateTimePickerFormat.Short;
    kptDTPickerFrom.Value = "01/" + DateTime.Today.AddMonths(1) + "/" + DateTime.Today.Year;
    kptDTPickerFrom.Value = kptDTPickerFrom.Value - 1;
    Last edited by dongtrien; September 10th, 2013 at 04:09 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center