Question : dateDiff - combining a date selection and a time selection

hi all,

I have four fields:

<< Start date (jquery calendar outputs a date - dd/mm/yyyy)
<< Start Time (drop down of 24 hour times eg: 05:00 - 12:00)

<< End Date (same as start date)
<< End Time (same as start time)

Form validation:

I want to produce an error when the End Date + End Time is GREATER than 24hrs from the Start Date + Start Time.

What i was previously doing was using datediff to check the difference in days between start date and end date. What i'd like to do is combine start date and start time and check the difference in hours between that and end date and end time. This will allow me to validate against hours instead of days.

I've included my first attempt at date diff using lsparsedatetime into the code snippet but it doesnt seem to be working out for me :) can anyone modify or improve this for me?

dateDiff("h",LSParsedateTime(SESSION.fireIsoSession.iso_date, SESSION.fireIsoSession.iso_startTime "English (UK)"), LSParsedateTime(SESSION.fireIsoSession.iso_enddate, SESSION.fireIsoSession.iso_endTime "English (UK)")) GT "0"

<!--- So i want to produce an error when the the hours paramter is greater than 0 --->

Answer : dateDiff - combining a date selection and a time selection

> LSParsedateTime(SESSION.fireIsoSession.iso_date, SESSION.fireIsoSession.iso_startTime

LSParsedateTime() only accepts 2 arguments.  So you need a space in between the date and time instead of a comma.  So it's one value  ie dd/mm/yyyy HH:mm

LSParsedateTime(SESSION.fireIsoSession.iso_date &" "& SESSION.fireIsoSession.iso_startTime, "English (UK)")
Random Solutions  
programming4us programming4us