Calculate The Number of Days Between...

User 2611054 Photo


Registered User
16 posts

Hay,
Could I get help with this. I would to make a Booking form. I made Dropdown element it has many options with a price input. also I made two Date Elements the first one is "From" and the second one is "To".
Now I want my form calculating a number of days between the dates "from" and "to". and also make the value of the number of days as "Form Total Multiplier element".
Can anyone help me and show me How I can do it ??
Thank you :)
User 187934 Photo


Senior Advisor
18,767 posts

Hi zizo,
To clarify you want the actual days between dates so if you picked March 6 2015 on one picker and March 7 on the other there is zero days between?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

Here's my S-Drive site with
examples of what can be accomplished in VSD.
https://progrower.coffeecup.com/
Here's my CoffeeCup SCCP Shop with examples of what can be done.
https://progrower.coffeecup.com/shop/
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2611054 Photo


Registered User
16 posts

Hi Eric,
First of all Thank your for replay. You right I didn't thought about it .anyway I don't want my form collecting ziro days. I want it collecting at least one day.
Do you think there is a way to make the first picker to choose current date or any days in the future.
and make the second picker specific to choose any next day of the day that was chosen on the first picker ?
User 187934 Photo


Senior Advisor
18,767 posts

I made what I think your looking for.
http://ericrohloff.com/coffeecup/ccforu … entpicker/
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

Here's my S-Drive site with
examples of what can be accomplished in VSD.
https://progrower.coffeecup.com/
Here's my CoffeeCup SCCP Shop with examples of what can be done.
https://progrower.coffeecup.com/shop/
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2611054 Photo


Registered User
16 posts

Hi Eric,
That exactly what I need :D .I would like to know how did you do it ?.
Thank you very much for your attention.:)
User 187934 Photo


Senior Advisor
18,767 posts

I put the instructions on there.;)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

Here's my S-Drive site with
examples of what can be accomplished in VSD.
https://progrower.coffeecup.com/
Here's my CoffeeCup SCCP Shop with examples of what can be done.
https://progrower.coffeecup.com/shop/
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2611054 Photo


Registered User
16 posts

Hi Eric,
your code has problem.
when I type the end date even past date the form collecting zero days and submit it.
it just work if I pick the date but if I type the date, it's not work.
I tried to make a number element that show the collected days as required element but still not work.
also, when I pick the start date and the end date the number of days shows up ok but when I undo the end date and type past date the number of days doesn't change and it keep the number of last collection .so can you help me with this ?

Thank you
User 187934 Photo


Senior Advisor
18,767 posts

Why are your typing the date when you have date picker?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

Here's my S-Drive site with
examples of what can be accomplished in VSD.
https://progrower.coffeecup.com/
Here's my CoffeeCup SCCP Shop with examples of what can be done.
https://progrower.coffeecup.com/shop/
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2611054 Photo


Registered User
16 posts

Hi
Actually, I planning to use the form as Issues form for Travel insurance document on a membership website for some agencies. and I want to be sure that my agencies don't make mastek when they issue and sell a travel Insurance document for them client.
User 187934 Photo


Senior Advisor
18,767 posts

I made an adjustment to the code that you can try. ;)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

Here's my S-Drive site with
examples of what can be accomplished in VSD.
https://progrower.coffeecup.com/
Here's my CoffeeCup SCCP Shop with examples of what can be done.
https://progrower.coffeecup.com/shop/
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.