Ticket #275 ( Closed )

Short Description Using time and date for conditionals
Entered By: gaucho When: 1999-03-24 16:36:13 Build: 1.03.28V
Categories Type: Question   Department: Product   Category: SurferScript
Depending on the day of the week and time I would like to display different text. Is this possible? For example:
If the day is Monday through Friday
  If the time of day is between 7 am and 5 am the next day
    If browser is javascript enabled
        display Form for login (written in javascript)
        display nothing.
    end if
    display schedule info
  end if
    display schedule info.
End if
Append By: WindSurfer  When: 1999-03-25 00:03:52  New Status: Pending Customer
Comment The following snippet will give you the current hour in an integer variable and the day of the week in a text variable-- the rest is up to you!
<tedeclare var date text 30>
<tedeclare var dayOfWeek text 10>
<tedeclare var hour integer>
<tedeclare var spaceAt integer>
<TESET Date=now()>
<TESET spaceAt=FindText(Date, " ")>
<TESET DayOfWeeK=TextLeft(Date, spaceAt)>
<TESET hour=TextLeft(TextRight(Date,8),2)>
Append By: gaucho  When: 1999-03-25 00:11:49  New Status: Closed
Comment Thanks Bill! I am not that familiar with the Date functions yet, but learning really quick =)