Use timestamp in query

Posted on 2012-09-17
Last Modified: 2012-09-17
I have the following query in oracle (PL/SQL):

select username, target, v.start_time, v.last_update_time, round(100*sofar/totalwork,2) as percent_, opname,
     time_remaining from sys.v_$session_longops v where
       start_time >= to_date('15-Sep-2012') order by username, start_time

I want to filter records than start_time > 15-Sep-2012 10:30 AM   but I don't know how to include time in above query.

Thanks for your help,
Question by:Farzad Akbarnejad
    LVL 76

    Accepted Solution

    Add the format mask:

    to_date('15-Sep-2012 10:30 AM','DD-Mon-YYYY HH:MI:SS AM')
    LVL 14

    Author Closing Comment

    by:Farzad Akbarnejad
    Great, Thanks for your quick response.


    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Suggested Solutions

    Introduction A previously published article on Experts Exchange ("Joins in Oracle", makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
    From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
    This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
    This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now