Jump to content

Search the Community

Showing results for tags 'time'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Caspio Bridge
    • General Questions
    • Caspio JavaScript Solutions
    • Tables, Views and Relationships
    • Import/Export and DataHub
    • DataPages
    • Deployment
    • Security, Authentications, Roles, SAML
    • Styles and Localizations
    • Parameters
    • API and Integration
    • Calculations and aggregations
    • User JavaScript and CSS Discussions

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start




Website URL






Found 17 results

  1. I want to be able to search a table according to the criteria of a “From Time” (greater than equal to) and a “To Time” (less than equal to), the problem is that there is no option for Time, only Date AND Time. The result should be ALL records from all dates between the specified time. Eg. Created on (Timestamp) From 06h00 To 08h00 à display records created between 06h00 and 08hoo across all of table history. Currently I am using a submission form with a virtual field to pass the parameter to the search form. I have one Timestamp field and three Date/Time fields I wish to search. Is there any way to setup a criteria with only a time precision?
  2. Hi! I am trying to create 8 Date/Time fields where the user inputs Date, Hours and Minutes in separate fields. I found some JS that works on combining the input, but it only works on combining one set of the three fields to on Display Field. This is the code that I put in the Footer: <script> //Created_On_From document.getElementsByName('Submit')[0].onmouseover = function(){ var date = document.getElementById('cbParamVirtual11').value; if(date == ""){ date = "00/00/0000"; } var hour = document.getElementById('cbParamVirtual26').value; if(hour == "") { hour = "00"; } var minute = document.getElementById('cbParamVirtual27').value; if(minute == "") { minute = "00"; } document.getElementById('cbParamVirtual49').value = date + " " + hour +":"+ minute; }; </script> <script> //Created_On_To document.getElementsByName('Submit')[0].onmouseover = function(){ var date = document.getElementById('cbParamVirtual18').value; if(date == ""){ date = "00/00/0000"; } var hour = document.getElementById('cbParamVirtual33').value; if(hour == "") { hour = "00"; } var minute = document.getElementById('cbParamVirtual32').value; if(minute == "") { minute = "00"; } document.getElementById('cbParamVirtual48').value = date + " " + hour +":"+ minute; }; </script> Any help would be appreciated...
  3. I have report which shows that list of the trips of my drivers. Currently, I have two shifts for my drivers- Morning (7am-7pm) and Night (7pm-7am). My issue is I want to show a report where, when my night shift driver searches all his trips for a specific date, it will show me all the trips made from 7PM of the chosen day until 7AM of the next day. I am hoping for your assistance.
  4. Years ago I added some JavaScript to my forms to prevent clients from selecting a "due date" that isn't at least two weeks in the future. Recently that code has stopped working, and all submissions are allowed through, regardless of the date selected. I think this may be tied to the recent Caspio updates. At least, that's all that I can see; the forms themselves haven't changed. Below I'm pasting my JS, which resides in the footer area of my forms. Any ideas would be greatly appreciated. Thanks! (BTW, I know two weeks is 14 days, not 13. But my users don't seem to recognize that, so I made this small allowance.) <SCRIPT LANGUAGE="JavaScript"> function check_date() { var entered_value = document.getElementById("InsertRecorddateNeeded").value; var entered_date = new Date(entered_value); var two_week_date = new Date(); two_week_date.setDate(two_week_date.getDate() + 13); if(entered_date < two_week_date) { alert("Must be at least 2 weeks in future"); return false; } } document.getElementById("caspioform").onsubmit=check_date; </SCRIPT>
  5. I have a details data page form on which records can be edited & updated. I would like to allow editing for all records not older than 2 days & then make the data page view only for records older than that. Can someone assist with a method of achieving this?
  6. I'm normalising a large Table which can extend to 3-4 million rows. One of the fields is 'Year' (eg '2017'). There are up to 80 different years in the database and obviously many are repeated many times, Is it worth indexing this field? I can make a table with a primary key and the related year, such as y1 = 2000, y2 = 2001, y3 = 2002 and so on, then relate the primary key to year field in the main Table. I'm just wondering whether all this fuss for so little is worthwhile. Is it going to make a performance improvement? Or should I be doing this a completely different way. Thanks for any advice
  7. Hello, I'm having difficulty with my time formula for a specific scenario. It is working correctly but producing too much time in some instances. I'm using a calculated field with the following formula to find the total time worked each day: cast (Datediff(hour, [@field:Start_TIme], [@field:End_Time])%24 as varchar)+' hours,'+ cast (Datediff(minute, [@field:Start_Time], [@field:End_Time])%60 as varchar)+ ' minutes' The formula is working when: The time calculated is more than an hour (i.e. 2:00 PM to 4:45 PM) = 2hrs, 45 minutes (CORRECT RESULT) or The time calculated is less than an hour but within the same hour of the day (i.e. 2:00 PM to 2:23 PM) = 0hrs, 23 minutes (CORRECT RESULT) The formula is NOT working when: The time calculated is less than an hour across DIFFERENT hours (i.e. 2:50PM - 3:05PM) = 1hrs, 15 minutes (INCORRECT RESULT) The hour should be '0' as the total time worked is '15' minutes only. I'm not sure if I can build a condition into the already existing formula(s) or if a new formula(s) is required. The standard datediff function also produces the same result. I've tried other code located online but have not been successful at removing the hour that appears in error. I've searched the CASPIO forum but was not able to locate a like issue. Any help or suggestions would be much appreciated. Thank you!
  8. Hello everybody, A simple question which is haunting me for a couple of days now. I have a table MEMBERS (where all my members are listed with different info. Most importantly there is one field: MemberUntil (Date Time Value) How is it possible for me to NOT allow a member to log in if the date is greater than the date under the field: MemberUntil? I have tried on VIEWS but the whole logic doesn't work. AND >> Members_MemberUntil >> Greater >> (then I have to manually input a date). I would like to be able to say: IF MemberUntil is greater than the date stated in the field MemberUntil, then this specific member will not be able to use his login details. Thank you so much for your time and consideration Cherif
  9. Need help to have a work around on how to ensure that students are not enrolling a subject which overlaps their current schedule. For example: Student A - is currently enrolled in a subject on Monday 1PM- 1:55PM. When she tries to enroll again, the system should not allow her to enroll any subject anytime between 1PM- 1:55PM on the same day.
  10. I am creating a datapage where my clients can make request for the time and date of a specific inspection. In order to be able to coordinate the inspectors I have to limit the time that the requests are made, therefore I need to create a condition that does the following: to process the request online then the request has to be made at the latest the prior business day before by 5:00 pm (local time) For example today is Tuesday at 6:00 pm local time, therefore the earliest inspection available is for Thursday since is already after 5:00 pm to request for tomorrow. I am intermediate user that have created a significant application but I don't have programming knowledge, so any help is really appreciated.
  11. Hi everyone, I have found several scripts that do not allow to submit the data if the date is too late (or too early). Is it possible to deny to enter the data, if time is too late? I mean, if the data may be added only before 10 AM, and now is 11 AM, then the data is not added and some error message is displayed? Or more simple script, if the data may be added only before 10 AM, and a user tries to enter "11 AM", then the data is not added and some error message is displayed? Thank you for your time!
  12. ababcock

    Time Sheet

    I have multiple submission forms that need to calculate total hours based on the begin time and end time entered. The script I have entered is: <script> document.getElementById('Submit').onmouseover = function(){ var date = document.getElementById('InsertRecordDate_of_Service').value; if(date == "") date = "1/1/2011"; var hour = document.getElementById('cbParamVirtual2').value; if(hour =="") hour="00"; var minute = document.getElementById('cbParamVirtual3').value; if(minute == "") minute = "00"; var ampm = document.getElementById('cbParamVirtual4').value; document.getElementById('InsertRecordStart_Time').value = date + " " + hour + ":" + minute + " " + ampm; var hour2 = document.getElementById('cbParamVirtual6').value; if(hour2 =="") hour2="00"; var minute2 = document.getElementById('cbParamVirtual8').value; if(minute2 == "") minute2 = "00"; var ampm2 = document.getElementById('cbParamVirtual7').value; document.getElementById('InsertRecordEnd_Time').value = date + " " + hour2 + ":" + minute2 + " " + ampm2; var start= new Date(document.getElementById('InsertRecordStart_Time').value); var end = new Date(document.getElementById('InsertRecordEnd_Time').value); var timeDiff = end - start; var hh = Math.floor(timeDiff / 1000 / 60 / 60); timeDiff -= hh * 1000 * 60 * 60; var mm = Math.floor(timeDiff / 1000 / 60); var totalmin= (mm+ (hh * 60)) ; document.getElementById('InsertRecordTotal_Units').value = totalmin.toFixed(2); }; </script> This is working some of the time, but not always, and I don't know what the problem is. I just submitted a record for 6/9/15 11:00 AM to 6/9/15 2:00 PM, and it came up with 185.00 hours. Does anyone know a way to make this work?
  13. Hi, I can't figure out how to allow someone to enter time in a Submission form. If I set the field to Date/Time, then I must enter a valid date, but I want to enter time only. I am also hoping there is a smart feature that can interpret/parse "8pm" and "815." thanks
  14. Hello All!! I have a date field in which times are captured and stored some of the time. I am trying to figure out how to display the date in an HTML block in a dynamic way that displays time if present and not if empty. Please consider: Date1: 01/06/2015 Date2: 01/07/2015 17:45:00 Desired display: Date1: Jan 6th, 2015 Date2: Jan 7th, 2015 5:45PM Actual display Date1: Jan 6th, 2015 12:00AM Date2: Jan 7th, 2015 5:45PM When time is not captured it is not relevant and thus shouldn't be displayed. I have a workaround that involves a calculated field, but it's pretty clunky. Any ideas? Thanks
  15. Hello All Does anyone know how to change the submission form with a time limit (http://howto.caspio.com/tech-tips-and-articles/advanced-customizations/how-to-add-a-time-limit-to-submission-forms/) so as it diverts to another webpage (unsubmitted) if someone doesn't complete it in time? Currently, it submits itself automatically. Many thanks Duncan
  16. How do you configure search fields for just times and not date? Rey
  17. I am building a report and want to create a virtual field which shows the result of subtracting one time/date field from another and then sums the times at the bottom. Ie this is for calculation the time taken to enter data for each record. Can anyone advise me on code for this?
  • Create New...