asp classic - Format a date time string -
im having problem formatting datetime field in asp classic. format need yyyy-mm-dd hh:mm:ss code far: changetodate = cdate(request.form("datepicker")&" "&request.form("timepicker")) datetime = datepart("d", changetodate)&"-"&datepart("m", changetodate)&_ "-"&datepart("yyyy", changetodate)&" "&datepart("hh", changetodate)&":"&_ datepart("mi", changetodate)&":00" but gives me invalid procedure call datepart exception. i'm kind of stuck on this. not sure if matters or not doing can insert datetime database. when use cdate function following error:conversion failed when converting date and/or time character string. query looks cdate function called: insert mytable(client ,campaign ,location ,cardcode ,created ,message ,rating ,info ,mobile ,datamessage ) values (117,227,1487,...