Android Question Date parse

Discussion in 'Android Questions' started by stanks, Apr 28, 2015.

  1. stanks

    stanks Active Member Licensed User

    hi

    i have date/time as

    Code:
    Mon, 13 Oct 2014 07:54:00 GMT
    this format is almost like

    Code:
    "EEE, d MMM yyyy HH:mm:ss z"
    almost because with above format i get CEST and not GMT

    any1 have idea how to convert/parse this

    Code:
    Mon, 13 Oct 2014 07:54:00 GMT
    to smth like
    Code:
    13.10.2014
    that is format "dd.MM.yyyy"

    thanks
     
  2. thedesolatesoul

    thedesolatesoul Expert Licensed User

    What exactly are you doing (in code)?
    I would expect something like:
    Code:
    DateTime.DateFormat = "EEE, d MMM yyyy HH:mm:ss z"
    Dim myDate as Long = DateTime.DateParse("Mon, 13 Oct 201407:54:00 GMT")
    DateTime.DateFormat = "dd.MM.yyyy"
    Log(DateTime.Date(myDate))
     
    edm68 and NJDude like this.
  3. stanks

    stanks Active Member Licensed User

    already tried that but i get err unparsable date. this depends on locale or not?
     
  4. stanks

    stanks Active Member Licensed User

    now i see that the problem is locale....my device is not eng locale

    thanks thedesolatesoul
     
    thedesolatesoul likes 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