Convert usix time to human time

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wigiwood
    New Member
    • Sep 2007
    • 1

    Convert usix time to human time

    Hello All,

    I am using MS Excel to pull a data query from an orcale server (the application on the server is Remedy). Once I enter the SQL code and get the results, I then return the data to excel. Once in excel I can change the unix times to human time with an excel formula, but I would rather the data I get from the query come back in human time. I have included my code below. The table "a.resolved_tim e" is the one I enter in unix time, its the only way I know how. How can I get my date to come back human time?

    Much Thanks
    Lost Domino Admin

    [code=oracle]
    SELECT a.ticket_id_, a.status,a.case _type, a.TYPE, a.CATEGORY, a.sub_code,
    a.business_unit , a.country, a.site, a.assigned_to_g roup_,
    a.assigned_to_i ndividual_,a.re solved_time, a.create_time, a.submitted_by, a.SOURCE,
    a.hours_to_reso lve, a.total_hold, a.summary, a.solution_text ,
    a.root_cause, a.opening_type, a.opening_categ ory, a.opening_sub_c ode,
    a.priority, a.requester_log in_name_, a.submitter_grp
    FROM aradmin.gsk_inc ident a
    WHERE (a.assigned_to_ group_ =
    ANY ('PCS-JANITOR-QUOTA',
    'PCS-MESSAGING-NOTES-GBL',
    'PCS-MESSAGING-NOTES-UK',
    'PCS-MESSAGING-NOTES-US',
    'PCS-MESSAGING-EXTERNAL-SRVCS')
    )
    AND (a.resolved_tim e BETWEEN 1183248001 AND 1188604799)
    AND (a.case_type < 2)
    AND (a.hours_to_res olve >= 40)
    [/code]
    Last edited by Atli; Sep 8 '07, 03:36 AM. Reason: Added [code] tags
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    Hi and welcome to The Scripts!

    You have posted this question in the MySQL Forums.
    As this is an Oracle problem (I think) I will move it over to the Oracle forums, where it is more likely to get an answer.

    Moderator

    Comment

    • Atli
      Recognized Expert Expert
      • Nov 2006
      • 5062

      #3
      I have never used Oracle myself, but I ran into this while I searched Google for a solution to your problem.

      Check out the TO_CHAR() function.
      Might be what you are looking for.

      Comment

      • amitpatel66
        Recognized Expert Top Contributor
        • Mar 2007
        • 2358

        #4
        Originally posted by Atli
        I have never used Oracle myself, but I ran into this while I searched Google for a solution to your problem.

        Check out the TO_CHAR() function.
        Might be what you are looking for.
        Yes, TRY TO_CHAR() FUNCTION to get the time in desired format.

        For Eg:

        SELECT TO_CHAR(SYSDATE , 'DD-MON-RRRR') FROM DUAL

        Comment

        Working...