Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Time/Date stamp

delljohnbdelljohnb Member Posts: 81
Does anyone know the format of the output on a "system time query" and a "system date query"? I'm writing a VB program to upload to an Oracle server and the administrator gave me a goofy format to use. It is not a standard Windows generated format, and I'm wanting to check the format prior to writing a conversion sub-routine. Thank's for the assistance.

Delljohnb

Comments

  • infidelinfidel Member Posts: 2,900
    : Does anyone know the format of the output on a "system time query" and a "system date query"? I'm writing a VB program to upload to an Oracle server and the administrator gave me a goofy format to use. It is not a standard Windows generated format, and I'm wanting to check the format prior to writing a conversion sub-routine. Thank's for the assistance.

    Oracle is pretty forgiving with dates. You can convert nearly any string to an oracle date using the to_date() function and a mask.

    Something like:

    insert into tablename (datefield)
    values (to_date('20031021:23:03:59', 'YYYYMMDD:HH:MI:SS'))

    That mask may not be exactly correct, I didn't look it up. Point is, there are masks for all the various pieces of dates so no matter what format it's in on the VB side, you should be able to find a way to cast it into an Oracle date field.


    [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]

  • delljohnbdelljohnb Member Posts: 81
    : : Does anyone know the format of the output on a "system time query" and a "system date query"? I'm writing a VB program to upload to an Oracle server and the administrator gave me a goofy format to use. It is not a standard Windows generated format, and I'm wanting to check the format prior to writing a conversion sub-routine. Thank's for the assistance.
    :
    : Oracle is pretty forgiving with dates. You can convert nearly any string to an oracle date using the to_date() function and a mask.
    :
    : Something like:
    :
    : insert into tablename (datefield)
    : values (to_date('20031021:23:03:59', 'YYYYMMDD:HH:MI:SS'))
    :
    : That mask may not be exactly correct, I didn't look it up. Point is, there are masks for all the various pieces of dates so no matter what format it's in on the VB side, you should be able to find a way to cast it into an Oracle date field.
    :
    :
    : [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]
    :
    :


    Kewl. That should work. :-) Thanks!!!

    Respectfully,
    Delljohnb

Sign In or Register to comment.