HIDE IF startdate is the same as enddate

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default HIDE IF startdate is the same as enddate

    Hi again,

    I have the following code on my page. I am trying to hide the
    "eventenddate" if it is the same as the eventdate.

    <%IF (rsDateMatch.Fields.Item("eventenddate").Value) <>
    "<%=(rsDateMatch.Fields.Item('eventdate').Value)%> " Then%>
    - <%= DoDateTime((rsDateMatch.Fields.Item("eventenddate" ).Value), 1, 2057)
    %><br>
    <%End IF%>

    The above is giving me:
    Microsoft VBScript compilation (0x800A0409)
    Unterminated string constant

    So I tried:

    <%IF (rsDateMatch.Fields.Item("eventenddate").Value) <>
    "(rsDateMatch.Fields.Item('eventdate').Value)" Then%>
    - <%= DoDateTime((rsDateMatch.Fields.Item("eventenddate" ).Value), 1, 2057)
    %><br>
    <%End IF%>

    But this is showing me both the start date and the end date, even if they
    are the same.

    Any advice would be greatly appreciated. Thanks.
    Nath.


    Nathon Jones Guest

  2. Similar Questions and Discussions

    1. popup menus won't hide - PVII show/hide layers behaviour
      I've used the 'Auto show/hide by PVII" behaviour to create some popup menus for the navigation which make use of divs which appear and disappear....
    2. Hide a VAR (and its value) from URL
      If you don't want to redirect, then you can't use cflocation as that is what cflocation does. I would set up a client, session or cookie variable...
    3. where DATE is BETWEEN startdate and enddate...how?
      Hi, I need a little help with a SELECT statement. I have an events table in an Access db. The events have a start date and an end date. ...
    4. how to hide %20, %x or + when getting from DB
      Hi there! I migrated a mysql DB into a MSSQL DB. In this DB all chars like "blank" or @ are encoded in...whats it called in english? :) you...
    5. HowTo Select an ID where a "Date" is between startDate and endDate?
      Hello, I have this table ID startDate endDate ------------------------------- 1 04/01/2003 07/30/2003 2 08/01/2003 09/30/2003...
  3. #2

    Default Re: HIDE IF startdate is the same as enddate

    You have extra quote marks around the second element of the comparison chunk
    of code...
    Remove them and you should be fine.
    HTH
    Rob


    RobGT Guest

  4. #3

    Default Re: HIDE IF startdate is the same as enddate

    Thanks Rob,

    That's done it.

    <%IF (rsDateMatch.Fields.Item("eventenddate").Value) <>
    (rsDateMatch.Fields.Item("eventdate").Value) Then%>
    - <%= DoDateTime((rsDateMatch.Fields.Item("eventenddate" ).Value), 1, 2057)
    %>
    <%End IF%>

    Great.
    Nath.

    "RobGT" <rob@lighthouseuk.removeme.net> wrote in message
    news:d0k2sp$n8c$1@forums.macromedia.com...
    > You have extra quote marks around the second element of the comparison
    > chunk of code...
    > Remove them and you should be fine.
    > HTH
    > Rob
    >

    Nathon Jones Guest

Posting Permissions

  • You may not post new threads
  • You may 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