Results 1 to 4 of 4

Thread: Compare DateTime in Oracle 8i

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2005
    Posts
    70

    Question Compare DateTime in Oracle 8i

    I have a table that store datetime(example: StartDate) that store the date and time. Now i have a form in vb6 that search the startdate by searching only date.
    example: startdate in table(12/01/2007 11:00:00 AM)
    I want to search 12/01/2007.

    I mean that it search only date(not include time). How to do that? Thanks.

  2. #2
    A SQL Server fool GaryMazzone's Avatar
    Join Date
    Aug 2005
    Location
    Dover,NH
    Posts
    7,493

    Re: Compare DateTime in Oracle 8i

    You will need to format the datetime on the server to date only and then format the seach as a date using Oracle To_Date function.
    Sometimes the Programmer
    Sometimes the DBA

    Mazz1

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Nov 2005
    Posts
    70

    Question Re: Compare DateTime in Oracle 8i

    How can I format the datetime on the server to date only? Thanks.

  4. #4
    A SQL Server fool GaryMazzone's Avatar
    Join Date
    Aug 2005
    Location
    Dover,NH
    Posts
    7,493

    Re: Compare DateTime in Oracle 8i

    To_Date(To_String(fieldname,'mm/dd/yyyy'),'mm/dd/yyyy)
    Sometimes the Programmer
    Sometimes the DBA

    Mazz1

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