Hi everyone,
I have a stupid problem, but i can't get it to work:
i have this function to format a date:
<script type="text/javascript" language="JavaScript">
<!--
function convertDate(DT){
parts = DT.split('-');
if (parts[0] < 13){
datum = parts[1] + "/" + parts[0] + "/" + parts[2];
}else{
datum = parts[0] + "/" + parts[1] + "/" + parts[2];
}
return datum;
}
//-->
then i want to use this function to build an sql-query:
datum = request.form("txtDatum")
strSql = "select * from BW_Web where datum=#" & convertDate(datum) & "# order by DUBN asc;"
but this won't work...
Maybe someone has a solution for this ?
thanks already
Wim
I have a stupid problem, but i can't get it to work:
i have this function to format a date:
<script type="text/javascript" language="JavaScript">
<!--
function convertDate(DT){
parts = DT.split('-');
if (parts[0] < 13){
datum = parts[1] + "/" + parts[0] + "/" + parts[2];
}else{
datum = parts[0] + "/" + parts[1] + "/" + parts[2];
}
return datum;
}
//-->
then i want to use this function to build an sql-query:
datum = request.form("txtDatum")
strSql = "select * from BW_Web where datum=#" & convertDate(datum) & "# order by DUBN asc;"
but this won't work...
Maybe someone has a solution for this ?
thanks already
Wim