Jump to content

Search the Community

Showing results for tags 'date'.

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



Found 30 results

  1. Corey

    Date Format

    Hello, Sorry I am a newbie at this... I have a table with a date field that looks like this 02/19/2018. I am using Zapier to move this record to google sheets. When it gets to Zapier it looks like this 2018-02-19T00:00:00 The "T" is making it so that google sheets does not recognized this as a date field so I cannot run an operation I am trying to do. Any suggestions on how I can get the date to not have the "T" in it? I tried changing the formatting in localizations and it did absolutely nothing. Thanks
  2. My app has users in the USA who need the date format output displayed as mm/dd/yyyy (short & long date). But users in Australia, UK, etc need date format output to be dd/mm/yyyy (short & long date). Problem is there's only 1 option in a Localization for date format: either has to be mm/dd/yyyy OR dd/mm/yyyy and it cannot differentiate the user's location and switch them based on that. I'm thinking that the Localization only provides the format on output and that it might be possible to overwrite or change that format using JS on the datapage itself, to switch the format if the Authorization field for the country is not the USA. The basic logic would be something like this (I know it's not fully functional script, am just trying to show the thought process): <script> var v_country = parseFloat(document.getElementById("EditRecordAuthfieldMyCountryName”).value); if (v_country == "United States"){ [@field:Date_Start].format("mmm dd yyyy"); } else if (v_country == "Australia"){ [@field:Date_Start].format("dd mmm yyyy"); } </script> One thing- I'm not quite sure how to reference an Authorization field in the GetElementbyID part. Does anyone know if it's possible to do this and if so exactly how the code would look. Many thanks for any help-
  3. Hi, I have a simply one that I just can not figure out. I know it's easy but I haven't been able to get this to work. I have a field where the user will enter a date. I want to take that date and add one, then insert into another field on a submission form. Field Name: End Date (user entered) = 10/23/2017 Field Name: Expire Date (calculated) = 10/24/2017 Any help would be appreciated.
  4. Hello - I need help for custom JS to compute and display the Calibration_Due in a submission form when the user inputs the Last_Calibration date and the Calibration_Frequency · Calibration_Due = Last_Calibration + Calibration_Frequency Where field types are Calibration_Due – date Last_Calibration – date Calibration_Frequency – number of months
  5. I'd like for some elements to be visible based on date. So, for instance, I'd like the calendar item to show a reschedule link if the date is not within 5 days of the appointment time. I'm not sure how to do this on the calendar view because there seems to be no way to use rules.
  6. I need to display a link after a certain time/date (essentially "now" compared to the date entered in the record) in a table. (IF date.table IS AFTER NOW then show this link: http:...) Using rules and sections seems to make the most sense, except I can't figure out the criteria settings. : Condition, Operator, Value. If it's possible to do this right in the HTML/JS, that's cool too. (the script checks to see if someone has completed the form, and displays one of two different links) <script> if ('[@field:connect_PIF_ER_eval_complete]'.length<3) { document.write('<a href="https://www.seaetc.com/participant-dashboard/event-evaluation/?ER_ID=[@field:ER_Events_1_ER_ID]&Ev_Type=[@field:ER_Events_1_Event_Type]&join_ID=[@calcfield:1]" class="et_pb_button_caspio_compeval">Complete Evaluation</a>'); } else { document.write('<a href="../participant_certificate.php?fn=[@authfield:First_Name]&ln=[@authfield:Last_Name]&cred=[@authfield:Credentials]&er=[@field:ER_Events_1_Title]&date=[@field:ER_Events_1_ER3*]&ce=[@field:ER_Events_1_ER17_Total]" target="_blank" class="et_pb_button_caspio_viewcert">View Certificate</a>'); } </script> thx!
  7. moksamedia

    Restrict date range of calendar popup?

    Is there any way to restrict the possible date range of a calendar popup? I found a post that showed how to validate the element and show an alert, but what I'd like to be able to do is actually restrict the dates the user can select in the popup. Thanks, Andrew
  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. Hi there I would like to know if there is a way of changing the date format in a table from MM/DD/YY to DD/MM/YY I have changed region settings but the date format stays the same. I have been able to change the format on the datapage but have found no way of changing it on the table. Does anybody know if this is possible?
  10. Hi, i have several input fields (Date/time) for user to need to insert their birth date. As the popup calendar it is a little bit uncomfortable to go many years ago, some of them wants to insert the dates manually, so i need to create a mask with predefine dd/mm/yyyy format to able the users to just insert the numbers and then the field could have the right format to can be inserted. Any idea? Thanks!
  11. I have a tabular report with search page . In the search page, I send a parameter with a start date on which I seek ( [ @beginyear ] ) to the resulting page . In the Calculated Field in the resultpage i like to have: search date ( [ @ beginning year ] = 1-1-2016 Record: Start date item item [ @field : begin_date_item ] = 5-5-2016 result: Calculated Field = 5-5-2016 [@field: begin_date_item ] Or Record: Start date item item [@field: begin_date_item ] = 12-4-2015 result: Calculted Field = 1-1-2016 ( [ @ beginning year ] Unfortunately, this does not works. It seems that the parameter of the search page is not working with the proper date format , somebody ideas CASE WHEN [@field:begin_date_item]<[@beginyear] THEN [@beginyear] ELSE [@field:begin_date_item] END
  12. Hi, I need to store date when record was submitted. I know that I can stamp record, using a "time stamp" hidden field, but I need to store only date, month and year. I don't need time, because I'm not able to use this field in grouping data on Chart report. Thanks for help!
  13. I have a table that keeps track of the work schedule for our clients. The record contains the date that the assignment was opened, the ID assigned to the assignment, the name of the company, and product purchased. I have a report that sorts all open assignments by a concatenated field of all the above fields. The result of the HTML code looks like: 02/19/2016 - 32984 - Company Name (Product) This portion works perfectly. I have another DataPage that allows for the work schedule record to be modified. Some times the assignment is put on hold, some times the start date needs to be modified, etc. As soon as I open the DataPage that modifies the information, the Date changes from "02/19/2016" to "2/19/2016". The usual change is for an assignment to be put on hold and if I update the status, the new result of the display field is: Hold - 2/19/2016 - 32984 - Company Name (Product) If I change the Date from the calendar popup as well as the status, I get the following result: Hold - 02/20/2016 - 32984 - Company Name (Product) The problem is when sorting the report showing all assignments, the sort order is incorrect because there is no proceeding "0" in some of the dates. Here is the code pasted in the footer to create the value. <SCRIPT LANGUAGE="JavaScript"> function concatenate1() { var SchedStatus = document.getElementById("EditRecordStatus").value; var Control = document.getElementById("EditRecordID").value; var Company = document.getElementById("EditRecordCompany").value; var Company25 = Company.substring(0,25); var Date = document.getElementById("EditRecordDate_Open").value; var Product = document.getElementById("EditRecordProduct").value; var Product7 = Product.substring(0,7); if (SchedStatus == "Hold") { var DateControl = 'Hold - ' + Date + ' - ' + Control + ' - ' + Company25 + ' (' + Product7 + ')'; } else { var DateControl = Date + ' - ' + Control + ' - ' + Company25 + ' (' + Product7 + ')'; } document.getElementById("EditRecordDate_Control").value = DateControl; } document.getElementById("caspioform").onsubmit=concatenate1; </SCRIPT> What I need to know is how to get the proceeding "0" to remain in the date.
  14. In a table that I have, I have a date field that indicates the date an order was placed. I would like to create a calculated field in my datapage that will indicate how long it has been since the order was open (that is, the difference between today's date and the order creation date). Is there any way to do this? I know it will involve Datediff but I am unsure of how to insert today's date automatically. Ex. Order Created - 1/20/16 Today's Date - 2/12/16 The expected output would be 23. Thank you. EDIT: So I've implemented this using the following formula: DATEDIFF(day,OrderDate, GETUTCDATE()) and it works correctly but now I need this to ONLY count business days (at the moment, it is counting weekends as well). EDIT 2: I've figured it out. I will leave the answer here for posterity: To calculate the difference in dates (only considering business days), enter the following into your calculated field: select (DATEDIFF(dd,@StartDate, @EndDate)) - (DATEDIFF(ww,@StartDate, DATEADD(dd,-1,@EndDate)) * 2) - (CASE WHEN DATENAME(dw, @StartDate) = 'Sunday' THEN 1 else 0 end) - (CASE WHEN DATENAME(dw, @EndDate) = 'Sunday' THEN 1 else 0 end) where you replace @StartDate and @EndDate with your corresponding fields (if you're calculating days from today, then use GETUTCDATE() for @EndDate).
  15. logistics

    Restrict Date Fields

    Hello all, I am in the middle of creating a submission form. It will have two dates: a start date and end date, both selected from a calendar. The start date is compulsory. The end date is not compulsory. When the user inputs the start date, on clicking out of the field, I need the form to check if the date is both greater to or equal to 25 April 2016, AND less than or equal to 01 May 2016. If it is incorrect, I need a message to be displayed indicating the error, and stopping the user from moving on. If the user decides to input an end date, on clicking out of the field, I need the form to check if the date is both greater to or equal to the start date, AND less than or equal to 01 May 2016. If it is incorrect, I need a message to be displayed indicating the error, and stopping the user from moving on. How can I achieve this? Thanks in advance, Julien
  16. ScottDube

    Search Between 2 Calculated Dates?

    I need to search a table where "date_in_stock" is greater than 24 days but less than 84 days. So far I can't see how to do this. I see previous 84 days but that leaves me with records within the 0-24 day range that I can't have. Any ideas would be great! Thanks!
  17. Hi, all. So, I need to make the calendar date selection tool available to my form's users, but I don't want them to select a date that is less than two weeks in the future. In other words, if today is Sept. 10, the earliest date they should be able to enter/select is Sept. 24. Ideas? Thanks much!
  18. I have a table that has a few date fields in it. Each record has fields for 'Item Created Date', 'Estimated Ship Date', and 'Estimated Finish Date'. I need to have a single calendar that puts each of these dates (if there is a value in that field) and another fields value (for description) in the same calendar. For example. A record in this table with a Field:Description value of 'Oushak Rug' could have: Item Created Date: 05/01/15 Estimated Ship Date: 07/06/15 Estimated Finish Date: 09/03/15 I need the value 'Oushak Rug' to show up 3 times on the calendar, once for each date, along with a label, so it makes sense, like: Oushak Rug: Created Oushak Rug: Est. Ship Oushak Rug: Est. Finish The labels would be based on the date filed name the date was taken from. Is this possible in Caspio? I only see a way to use a single date field from a table and it would be cumbersome to have to have 3 separate calendars. My app is date heavy so I'm hoping this is doable. Thanks for the help, in advance.
  19. I have several apps that include a datepicker on a datefield. These have been working fine, just click the button and choose a date. Now something has changed... I can open the datepicker but something seems to get in the way som i cannot choose a date. The workaround is to change the CSS som the datebox ends up way out to the left. It seems like if there is a textfield that extends beyond the datepickerbox the box does not work... Any Ideas?? My workaround sucks because a have many apps that i have to change.
  20. Hello all, I am currently working on a search form (using a virtual field submission form) that has a dropdown menu to select from predefined reports. The way I would like this to function is that when the user selects an option (such as "Recent (Within the Last 10 Days)") an onchange function would change the search fields to the input needed to produce those results. I am fairly new to JavaScript, here is what I have been able to get: <SCRIPT LANGUAGE="JavaScript"> function ocPredefinedReports() { if (document.getElementById("cbParamVirtual8").value=='Recent (Within the last 10 days)') { document.getElementById("cbParamVirtual5").value= 'Doe'; } } document.getElementById("cbParamVirtual8").onchange=ocPredefinedReports;</script>​ Through Google-Fu I was able to get a function working at one point that gave me ten days ago (Unfortunately I didn't save it anywhere!) but it was in the wrong format entirely. Any and all help is much appreciated, thank you. -Blue Edit: Sorry about the terrible title, time for more coffee.
  21. 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
  22. Hi, I'm new to Caspio. I have a 9 date text fields with calendar picker. When user picks date for 1st field I need the subsequent 8 fields to populate with the 1st field's date + 1 business day. The result would be as follows: field 1 - 01/16/2015 SELECTED field 2 - 01/19/2015 AUTOPOPULATED field 3 - 01/20/2015 AUTOPOPULATED field 4 - 01/21/2015 AUTOPOPULATED field 5 - 01/22/2015 AUTOPOPULATED field 6 - 01/23/2015 AUTOPOPULATED field 7 - 01/26/2015 AUTOPOPULATED field 8 - 01/27/2015 AUTOPOPULATED field 9 - 01/28/2015 AUTOPOPULATED THEN SUBMIT* Any help, javascript and/or implementation would be greatly appreciated. Thanks.
  23. brbbrid

    Control Calendar Date Popup

    I have a form that has a few scripts already running in it to control some fields where I need to format numbers as currency. I'm good to go on those and they are running fine - A great big thank you to those who are posting solutions here in the forums! - It's been a great help to me and I would not be able to do some of the great things I'm accomplishing without those wonderful individuals who post solutions and code here in the forums. But I now need to control 2 date fields. I have the calendar picker set up for each field, but was hoping for the "Start Date" field, I could somehow restrict it by year, so that it would only start in 2015, and then for the "End Date" field, if there is anyway to control that so that it would only allow the date entered to be AFTER the "Start Date"? I have seen some other solutions in the forums here that refer specifically to making the dates be today or after today, but nothing with year or where a second date field is dependent on the date entered in the first or where year is the only control.... I've got to get this working soon so if anyone can help me, I would appreciate it so much! Thank you in advance!
  24. Hi everyone. I need to change the format of the pop-up selector in a datapage or even for the whole app. I have changed the localization of the date/time to the format I want 9/27/2014 when I click a date in a calendar pop-up. However, even though I have set the localization for this format, it adds a 0 in front of all the months that are one digit. No matter what I can not get the format to change on a calendar pop-up. Where do I change the calendar pop-up format to 9/27/2014 instead of 09/27/2014 (this is what it does) THANKS
  25. Hello all; I am trying to log the time users are logged in, and I am unable to get any precision. I would like hours to be displayed with two decimal places of accurate precision, but Datediff rounds to the nearest unit of time. This (IMO) should be fairly easy to overcome by using a smaller unit of time, and dividing that large number by 60 or 3600 (for minute or second), but no luck. Using the following sessions let's look at what I want, what I've tried, and what I'm getting. SessionID = 1 | LoginDT 8-17-2014 09:00:00 | LogoutDT 8-17-2014 09:15:00 SessionID = 2 | LoginDT 8-17-2014 10:00:00 | LogoutDT 8-17-2014 10:40:00 SessionID = 3 | LoginDT 8-17-2014 11:00:00 | LogoutDT 8-17-2014 13:30:00 Desired Result: SessionID = 1 | Logged Hours 0.25 SessionID = 2 | Logged Hours 0.67 SessionID = 3 | Logged Hours 2.50 Datediff(hour,[@field:LoginDT],[@field:LogoutDT]) SessionID = 1 | Logged Hours 0.00 SessionID = 2 | Logged Hours 0.00 SessionID = 3 | Logged Hours 2.00 Datediff(minute,[@field:LoginDT],[@field:LogoutDT]) SessionID = 1 | Logged Hours 15.00 SessionID = 2 | Logged Hours 40.00 SessionID = 3 | Logged Hours 150.00 Datediff(minute,[@field:LoginDT],[@field:LogoutDT])/60 SessionID = 1 | Logged Hours 0.00 SessionID = 2 | Logged Hours 0.00 SessionID = 3 | Logged Hours 2.00 (Datediff(minute,[@field:LoginDT],[@field:LogoutDT]))/60 SessionID = 1 | Logged Hours 0.00 SessionID = 2 | Logged Hours 0.00 SessionID = 3 | Logged Hours 2.00 Round(Datediff(minute,[@field:LoginDT],[@field:LogoutDT])/60,2) SessionID = 1 | Logged Hours 0.00 SessionID = 2 | Logged Hours 0.00 SessionID = 3 | Logged Hours 2.00 Round((Datediff(minute,[@field:LoginDT],[@field:LogoutDT]))/60,2) SessionID = 1 | Logged Hours 0.00 SessionID = 2 | Logged Hours 0.00 SessionID = 3 | Logged Hours 2.00 Any ideas? Thanks!