/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function fSQLDateToday( ) : String { var vDate : Date = new Date(); var vMonth : Number = vDate.getMonth(); var vYear : Number = vDate.getFullYear(); var vDay : Number = vDate.getDate(); return vYear + "-" + ( (vMonth + 1) < 10 ? "0" + (vMonth + 1) : (vMonth + 1) ) + "-" + ( (vDay < 10) ? "0" + vDay : vDay ); }