Forum Moderators: open

Message Too Old, No Replies

Calculating days from current date to specified date

Calculating days from current date to specified date

         

JohnMB

3:13 pm on Jan 14, 2005 (gmt 0)

10+ Year Member



Hi
I would be very grateful if anyone can help please with the following.

I have designed a simple web form that allows users to input and submit their arrival date(along with other travel information).

I used some javascript code to ensure that the arrival date always appears in the same format i.e. dd/mm/yyyy

This information will then be forwarded to an on-line Database at Aweber so that I can send e-mails to the client who requested the information.

What I really would like to do is to incorporate an additional field on the web form that would calculate the number of days from the date of form submission to their arrival date and to put that resultant day number into a separate field (hidden field). This day number could then be transferred to the online DBase with the form information and would then enable me to send out the correct e-mails dependant on the number of days to their arrival date.

I've searched this forum and found some Javascript code that calculates the day number between two dates but it doesnt achieve what I want exactly - perhaps with some tweaking though it might? Here is the URL for the thread on date calculation:

[webmasterworld.com...]

and here is the URL for my webform:
[66.6.210.113...]

I'm not really familiar JavaScript so I have a little difficulty in understanding how to do this exactly or if it can be done at all?

Any help would be much appreciated.

Thanks

John

JohnMB

3:33 pm on Jan 14, 2005 (gmt 0)

10+ Year Member



Hi
Just a quick message to say please ignore my request for help above.

I have spoken to the operators of the Dbase and they say they can't dynamically update the day number and therefore this function will not help me.

apologies for the inconvenience

JohnB