Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  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. Similar Questions and Discussions

    1. Compare 2 PDF
      Hi, is there any way to automate the comparison of two PDFs from outside Acrobat? e.g. I mark 2 PDFs, right-click offers me COMPARE and after...
    2. Using <CFIF> to compare two set of time
      I am using <cfif> to compare two set of time, if there is a match then display link. I am doing something wrong because it not displaying a link...
    3. compare date,time
      Hi, I have the following 12/08/2003, 11:00 13/08/2003, 23:00 Now I would like to compare them and then calculate the how long time was...
    4. Time compare using milliseconds
      Hello all, I have two timestamps that look like this: 08:42:38:624 08:42:39:437 I need to find out the difference. I have never worked with...
  3. #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

  4. #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

  5. #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

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