Professional Web Applications Themes

Urgent help needed! Compare a string to Sysdate in Oracle - ASP

I am trying to write a simple SQL statement which will take a string (startdate) in the format DDMMYYYY and compare it to a date stored in an Oracle database. My SQL is as follows: <% "select * from tblhistory where datechanged = '" & startdate & "'" %> The field datechanged in the Oracle database is set up using the Sysdate variable, on a previous occasion. Any ideas how I can get my startdate variable into the correct format so that I can compare it with the 'datechanged' field? Thanks in advance....

  1. #1

    Default Urgent help needed! Compare a string to Sysdate in Oracle

    I am trying to write a simple SQL statement which will take a string
    (startdate) in the format DDMMYYYY and compare it to a date stored in
    an Oracle database. My SQL is as follows:

    <%

    "select * from tblhistory where datechanged = '" & startdate & "'"

    %>

    The field datechanged in the Oracle database is set up using the
    Sysdate variable, on a previous occasion.

    Any ideas how I can get my startdate variable into the correct format
    so that I can compare it with the 'datechanged' field?

    Thanks in advance.
    WroteForLuck Guest

  2. #2

    Default Re: Urgent help needed! Compare a string to Sysdate in Oracle

    look up the to_date function in oracle help.

    Here is what we use (replace %%DATE%% with the date string in yyyy-mm-dd
    hh24:mi:ss format):

    TO_DATE('%%DATE%%','YYYY-MM-DD HH24:MI:SS')

    --
    Mark Schupp
    --
    Head of Development
    Integrity eLearning
    Online Learning Solutions Provider
    [email]mschuppielearning.com[/email]
    [url]http://www.ielearning.com[/url]
    714.637.9480 x17


    "WroteForLuck" <k_standerhotmail.com> wrote in message
    news:1bb8fc86.0307170055.2928701cposting.google.c om...
    > I am trying to write a simple SQL statement which will take a string
    > (startdate) in the format DDMMYYYY and compare it to a date stored in
    > an Oracle database. My SQL is as follows:
    >
    > <%
    >
    > "select * from tblhistory where datechanged = '" & startdate & "'"
    >
    > %>
    >
    > The field datechanged in the Oracle database is set up using the
    > Sysdate variable, on a previous occasion.
    >
    > Any ideas how I can get my startdate variable into the correct format
    > so that I can compare it with the 'datechanged' field?
    >
    > Thanks in advance.

    Mark Schupp Guest

Similar Threads

  1. Compare string with XML
    By Emil RT in forum Macromedia Flash Data Integration
    Replies: 1
    Last Post: July 4th, 10:39 AM
  2. urgent help needed!!!
    By Joe Science in forum Macromedia ColdFusion
    Replies: 0
    Last Post: April 7th, 12:10 AM
  3. missing txt URGENT Help NEEDED???????
    By benluke@adobeforums.com in forum Adobe Indesign Windows
    Replies: 71
    Last Post: July 28th, 11:21 PM
  4. Urgent help Needed
    By Anantha Narayanan Vijayaraghavan in forum ASP.NET Data Grid Control
    Replies: 5
    Last Post: December 18th, 04:28 PM
  5. Urgent help needed,please
    By Bobby H in forum Macromedia Director Basics
    Replies: 2
    Last Post: October 15th, 06:56 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139