Hi.
I have a table holding two fields with dates I try to compare in java script.
The first date is generated by caspio timestamp, and called "date_submitted", formatted like"05/15/2014 23:43:58" in the table.
The second date,"Date_event_start", is a date submitted from a Caspio calendar, formatted like "05/30/2014" in the table.
When i insert both dates in a HMTL block within Caspio they retur quite different.
"date_submitted" returns: "05/15/2014 11:43:58 PM"
and
"Date_event_start" returns: "30.05.2014"
Why does Caspio default output different date formats???
I want to compare the dates with a simple script like:
<HTML>
[@field:Late_submitted]
<a id="visi[@field:ID_delegate]">
<script>
var isi = document.getElementById("visi[@field:ID_delegate]");
if('[@field:date_submitted]' >= '[@field:Date_event_start]'){
isi.parentNode.parentNode.style.backgroundColor = '#FFB0AD';
}
else{
isi.parentNode.parentNode.style.backgroundColor = '#ADD8E6';
}
</script>
</HTML>
How can i make the different date fields comparable???
--- Frode ---