Problems to calculate 2 years

RodrigosjcRodrigosjc Member ✭✭

Hello everyone, I'm having a little problem is this image there
1 When I put 1 year and the foundation works,
2 When we lay 2 years and foundation, it does not work shows error.
I wanted to know how I do for the 2 year option shows the date of two years certain in xamarin forms. Any examples?

Thank you very much



Answers

  • JohnHardmanJohnHardman GBUniversity mod

    @Rodrigosjc

    It is unclear what you are trying to do.

    If you want to find the date/time (1 day before) 2 years from now, you can do:

    DateTime endDateTime = DateTime.Now.AddYears(2).AddDays(-1);
    

    If that isn't what you are trying to do, can you write underneath the English below, the equivalent text in your preferred language. That might help make the intended meaning clearer. (I have already requested that the forum rules be amended to allow posts to be in English as they are now, but with the same text in another language underneath if that might help understanding).

    @Rodrigosjc said:
    Hello everyone, I'm having a little problem is this image there
    1 When I put 1 year and the foundation works,
    2 When we lay 2 years and foundation, it does not work shows error.
    I wanted to know how I do for the 2 year option shows the date of two years certain in xamarin forms. Any examples?

Sign In or Register to comment.