How do I - IF, THEN based on DATE

Results 1 to 3 of 3

Thread: How do I - IF, THEN based on DATE

  1. #1
    Join Date
    Dec 1969
    Posts
    1,315

    Default How do I - IF, THEN based on DATE

    IF Date &#060; ??????? THEN<BR>Response.write "Good Morning"<BR>Else<BR>Response.werite "Good Evening"

  2. #2
    Matt Braun Guest

    Default RE: How do I - IF, THEN based on DATE

    Here you go. Use Military time if you want to add an "evening" for instance &#062;formatdatetime("17:00") THEN ...<BR><BR>Hope this helps!<BR><BR>&#060;%<BR>IF formatdatetime(now(),4) &#062; formatdatetime("12:00",4) THEN<BR>Response.Write("Good Afternoon")<BR>ELSEIF formatdatetime(now(),4) &#060; formatdatetime("12:00", 4) THEN<BR>Response.Write("Good Morning")<BR>END IF<BR>%&#062;

  3. #3
    Jason Miller Guest

    Default Alt- RE: How do I - IF, THEN based on DATE

    Or leave the poor formatdatetime alone and just ask the now...<BR><BR>if inStr(now(), "AM") then response.write "G&#039Morning" else response.write "G&#039Evening"<BR><BR>only (severe) disad there is if they&#039re using military time to begin with... but if they&#039re not, it&#039s a tad bit more elegant.

Posting Permissions

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