Results 1 to 5 of 5
  1. #1

    Default Another C# Problem: Data Picker


    Guyz hapit na gyud ko human sa video rental system...hehehe...samok samok na pud ko hap

    this is my code
    Code:
    private void dateTimePicker1_ValueChanged(object sender, EventArgs e)
            {
                
                DateTime tempdt = dateTimePicker1.Value;
                int day= tempdt.Day;
                int month = tempdt.Month;
                int year= temdt.Year;
                DateTime datedue= month/day+3/year??????
    
                
            }
    everything fine but i need to have another datetime variable that would be 3 days more than the current date..first time ni nko mag manipulate ug date so la koy clue

  2. #2
    DateTime.AddDays function
    DateTime datedue= dateTimePicker1.Value.AddDays(3);

    If datetimepicker1.value returns a datetime then it should work

  3. #3
    lol there is .adddays function? damn i should research better...lol tnx bro u save me

  4. #4
    new problem again about formatting the date...string.format doesnt seem to work

    Code:
    DateTime currentdate = thecurrentdate.Value;
                DateTime datedue = thecurrentdate.Value.AddDays(days);
                string dateduestring = datedue.ToString();
                String.Format("{0:M/d/yyyy}", dateduestring);
                txt_datedue.Text = dateduestring;

  5. #5
    string dateduestring = datedue.ToString("M/d/yyyy");

  6.    Advertisement

Similar Threads

 
  1. System Registry data problem....pls help me
    By ellakylamarie in forum Networking & Internet
    Replies: 5
    Last Post: 11-26-2011, 05:41 PM
  2. Ahh Another C# problem
    By Deathnote in forum Programming
    Replies: 24
    Last Post: 07-28-2009, 04:53 PM
  3. Data Execution Prevention (DEP) Problem
    By rhodem24 in forum Software & Games (Old)
    Replies: 2
    Last Post: 06-01-2009, 04:01 PM
  4. another problem....huhuh
    By parts in forum Computer Hardware
    Replies: 23
    Last Post: 01-07-2008, 03:51 PM
  5. Connecting to another PC via dial-up ( problems )
    By EarlZ in forum Networking & Internet
    Replies: 7
    Last Post: 01-07-2006, 12:16 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
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top