... logout code here ... [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => mattw [ip] => webforumsuser@m [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 3 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> Window Survey is Open = #SystemTime# to #SystemTime2#
CurrentTime = #CurrentTime#
You are here too early... You are too late... You can proceed [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 0 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => rklanza [ip] => 150.135.192.26 [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 4 [islastshown] => 1 [isfirstshown] => [attachments] => [allattachments] => ) --> Time Compare? - Coldfusion - Advanced Techniques

Time Compare? - Coldfusion - Advanced Techniques

I was wondering if anyone has done something like this and if so, please shed some light on this issue. I have an application that connects to an ERP System to authenticate users. Every night the ERP is down for scheduled updates and so my application is also supposed to be down. What is the best way for me to now allow anyone after a certain time everyday. I was looking for something to compare the current time but I have not been lucky. If anyone does now how to solve this please help. Thanks...

  1. #1

    Default Time Compare?

    I was wondering if anyone has done something like this and if so, please shed
    some light on this issue.

    I have an application that connects to an ERP System to authenticate users.
    Every night the ERP is down for scheduled updates and so my application is also
    supposed to be down. What is the best way for me to now allow anyone after a
    certain time everyday. I was looking for something to compare the current time
    but I have not been lucky.

    If anyone does now how to solve this please help.

    Thanks

    Shivang13 Guest

  2. #2

    Default Time Compare?

    I was wondering if anyone has done something like this and if so, please shed
    some light on this issue.

    I have an application that connects to an ERP System to authenticate users.
    Every night the ERP is down for scheduled updates and so my application is also
    supposed to be down. What is the best way for me to now allow anyone after a
    certain time everyday. I was looking for something to compare the current time
    but I have not been lucky.

    If anyone does now how to solve this please help.

    Thanks

    Shivang13 Guest

  3. #3

    Default Re: Time Compare?

    What have you tried? Seems like something like this should work...
    <cfset SystemDownTime = "CreateTime(20, 00, 00)> <!--- 10pm --->
    <cfset CurrentTime = CreateTime(Hour(Now()), Minute(Now()), Second(Now()))>
    <cfif CurrentTime GT SystemDownTime>
    ... logout code here ...
    </cfif>

    mattw Guest

  4. #4

    Default Re: Time Compare?

    How about this?

    <!--- Set the Time that is the lower bound of the window --->
    <cfset SystemTime = TimeFormat(CreateTime(12, 15, 00))>

    <!--- Set the Time that is the upper bound of the window --->
    <cfset SystemTime2 = TimeFormat(CreateTime(12, 45, 00))>

    <!--- Set the current Time --->
    <cfset CurrentTime = TimeFormat(CreateTime(Hour(Now()), Minute(Now()), Second(Now())))>

    <!--- Output the Time Variables and Time Stamps --->
    <cfoutput>
    Window Survey is Open = #SystemTime# to #SystemTime2#<br>
    CurrentTime = #CurrentTime#<br>
    </cfoutput>

    <!--- Test to see if the respondent is here too early --->
    <cfif CurrentTime LT SystemTime>
    You are here too early...
    <cfelse>

    <!--- Test to see if the respondent is here too late --->
    <cfif CurrentTime GT SystemTime2>
    You are too late...
    <cfelse>
    You can proceed
    </cfif>

    </cfif>
    rklanza Guest

Similar Threads

  1. Compare 2 PDF
    By Claus_Allgeier@adobeforums.com in forum Adobe Acrobat SDK
    Replies: 2
    Last Post: December 10th, 02:08 PM
  2. Using <CFIF> to compare two set of time
    By phamtum in forum Coldfusion Database Access
    Replies: 10
    Last Post: May 31st, 03:51 PM
  3. Formatting a time field to 24 hour time (Military time) in the Datagrid
    By David Hearn in forum ASP.NET Data Grid Control
    Replies: 1
    Last Post: September 10th, 02:50 PM
  4. compare date,time
    By Awards in forum PERL Beginners
    Replies: 5
    Last Post: August 27th, 06:10 PM
  5. Time compare using milliseconds
    By Paulers in forum PERL Miscellaneous
    Replies: 3
    Last Post: August 4th, 08:31 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
  •