Wish dateadd with MOre than 12 Month

Discussion in 'Bugs & wishlist' started by hery71, Jul 31, 2018.

Tags:
  1. hery71

    hery71 New Member Licensed User

    Hi i m new in B4A and i try to use date operation but it will give me wrong results???
    dim dtn as long
    DateTime.DateFormat = "yyyy/mm/dd"
    dtn = DateTime.Now
    log( datetime.date(dtn)) ' it will give for today 2018/18/31 not normally 2018/07/31?????
    is it a bugg???? or i do some mistake????
    Hery
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    1. Please use [code]code here...[/code] tags when posting code.
    2. Your code is wrong, there is no bug here. Start a new thread in the questions forum for further discussion.
     
    Johan Hormaza likes this.
  3. Mahares

    Mahares Well Known Member Licensed User

    Code:
    DateTime.DateFormat = "yyyy/mm/dd"
    must be:
    Code:
    DateTime.DateFormat = "yyyy/MM/dd"   'capital
    You just joined the forum. You cannot start making speedy remarks about bugs unless you have been around for a while, particularly when you are dealing with DATES and @Erel.
     
    KMatle, asales and Filippo like this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice