Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Date Woes

    I am trying to convert a date from this format:

    yyyymmddHHMMSS.mmmmmmsUUU

    to a format that ASP.NET (VB.NET) understands.

    The above date format is used by the WMI datetime type. I don't care about
    the mmmmmmsUUU part, as that counts milliseconds and microseconds. The sUUU
    is a three digit offset indicating the number of minutes that the
    originating time zone deviates from UTC. Other than that, the format is
    pretty self explanatory.

    (more info here:
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/[/url]
    date_and_time_format.asp)

    I can imagine all kinds of weird, contorted, or otherwise convoluted ways of
    formatting this date, but I wanted to check and see if there's an better way
    before I go off and spend gobs of time reinventing the wheel.

    Any ideas?

    -Kevin


    Kevin Vaughn Guest

  2. Similar Questions and Discussions

    1. JSObject returns wrong date. How can Iextract correct date from digital signature?
      I'm trying to extract name and date from digital signatures by using JSObject in Excel VBA, but JSObject returns wrong date. Year, month, hour and...
    2. #39245 [NEW]: date function generate wrong date with 1162083600 timestamp
      From: lohner at aldea dot hu Operating system: Linux PHP version: 5.1.6 PHP Bug Type: Date/time related Bug description: ...
    3. CFMX7 & informix Date conversion woes
      I have a trial install of CF MX7 w/ informix 9.3 on linux. Everything works fine until I query using dates. The front-end MUST allow users to query...
    4. PDF woes
      EPS files are intended to be placed on a page in a page-layout program, and thus contain no page orientation or page size information. If you are...
  3. #2

    Default Re: Date Woes

    the easiest way i've seen would probably be:

    Dim myDate as Date

    myDate = yearstring & "/" & monthstring & "/" & daystring & " " & hourstring
    & ":" & minstring

    which means you'll have to split up the string somewhere into those
    strings...

    good luck


    "Kevin Vaughn" <kevin.vaughn@ttu.edu> wrote in message
    news:vg8cv9p9t041f2@corp.supernews.com...
    > I am trying to convert a date from this format:
    >
    > yyyymmddHHMMSS.mmmmmmsUUU
    >
    > to a format that ASP.NET (VB.NET) understands.
    >
    > The above date format is used by the WMI datetime type. I don't care
    about
    > the mmmmmmsUUU part, as that counts milliseconds and microseconds. The
    sUUU
    > is a three digit offset indicating the number of minutes that the
    > originating time zone deviates from UTC. Other than that, the format is
    > pretty self explanatory.
    >
    > (more info here:
    >
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/[/url]
    > date_and_time_format.asp)
    >
    > I can imagine all kinds of weird, contorted, or otherwise convoluted ways
    of
    > formatting this date, but I wanted to check and see if there's an better
    way
    > before I go off and spend gobs of time reinventing the wheel.
    >
    > Any ideas?
    >
    > -Kevin
    >
    >

    Daniel Bass Guest

  4. #3

    Default Re: Date Woes

    That's really exactly what I was looking for. Thank you for your time.

    -Kevin

    "Daniel Bass" <danielbass@postmaster.co.uk> wrote in message
    news:uUYpJzWQDHA.3768@tk2msftngp13.phx.gbl...
    > the easiest way i've seen would probably be:
    >
    > Dim myDate as Date
    >
    > myDate = yearstring & "/" & monthstring & "/" & daystring & " " &
    hourstring
    > & ":" & minstring
    >
    > which means you'll have to split up the string somewhere into those
    > strings...
    >
    > good luck
    >
    >
    > "Kevin Vaughn" <kevin.vaughn@ttu.edu> wrote in message
    > news:vg8cv9p9t041f2@corp.supernews.com...
    > > I am trying to convert a date from this format:
    > >
    > > yyyymmddHHMMSS.mmmmmmsUUU
    > >
    > > to a format that ASP.NET (VB.NET) understands.
    > >
    > > The above date format is used by the WMI datetime type. I don't care
    > about
    > > the mmmmmmsUUU part, as that counts milliseconds and microseconds. The
    > sUUU
    > > is a three digit offset indicating the number of minutes that the
    > > originating time zone deviates from UTC. Other than that, the format is
    > > pretty self explanatory.
    > >
    > > (more info here:
    > >
    >
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/[/url]
    > > date_and_time_format.asp)
    > >
    > > I can imagine all kinds of weird, contorted, or otherwise convoluted
    ways
    > of
    > > formatting this date, but I wanted to check and see if there's an better
    > way
    > > before I go off and spend gobs of time reinventing the wheel.
    > >
    > > Any ideas?
    > >
    > > -Kevin
    > >
    > >
    >
    >

    Kevin Vaughn Guest

  5. #4

    Default Date Woes

    Regular Expressions are GREAT for this kind of parsing...
    Concise, easy to change and understand...

    >-----Original Message-----
    >I am trying to convert a date from this format:
    >
    >yyyymmddHHMMSS.mmmmmmsUUU
    >
    >to a format that ASP.NET (VB.NET) understands.
    >
    >The above date format is used by the WMI datetime type.
    I don't care about
    >the mmmmmmsUUU part, as that counts milliseconds and
    microseconds. The sUUU
    >is a three digit offset indicating the number of minutes t
    David Waz Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139