DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: changing date from EST to GMT in sqlldr script

  1. #1
    Join Date
    Oct 2002
    Posts
    182

    Question changing date from EST to GMT in sqlldr script

    my flatfile date looks like this: 2002/01/01 00
    it is currently in EST time.
    I need to load it as GMT time.
    Since GMT never has daylight-savings, it is not as easy as just adding 5 hours (could be 4 or 5 hours).

    I wanted to use the NEW_TIME function in my control file to do this.
    My old control file to just load the date is (edited meaningless params):
    OPTIONS
    ( SKIP = 1,
    )
    LOAD DATA
    APPEND
    INTO TABLE temp_weather_data
    FIELDS TERMINATED BY '\t'
    (
    station_code CHAR,
    dummy1 FILLER,
    RDNG_DT DATE 'yyyy/mm/dd HH24',
    TEMP_NBR integer external
    )

    I tried editing the date line to look like this:
    RDNG_DT new_time(DATE 'yyyy/mm/dd HH24',EST, GMT),

    any suggestions? that didn't work above to change to GMT


    thanks.
    - Cookies

  2. #2
    Join Date
    Oct 2002
    Posts
    182
    bah!

    I just figured out that I still need to account for Daylight savings time (EST or EDT) so it all amounts to nothing.

    Unless someone has an idea of an easy way to convert to GMT accounting for Daylight Savings I'll just hardcode the dates into a PROC and have the proc manually edit the fields.
    - Cookies

  3. #3
    Join Date
    Jul 2001
    Location
    Slovenia
    Posts
    422
    Have you considered using TIMESTAMP WITH TIME ZONE?
    Tomaž
    "A common mistake that people make when trying to design something completely
    foolproof is to underestimate the ingenuity of complete fools" - Douglas Adams

Posting Permissions

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


Click Here to Expand Forum to Full Width