AS3 SQL Date Today


/ Published in: ActionScript 3
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function
  2. fSQLDateToday(
  3. ) : String
  4. {
  5. var vDate : Date = new Date();
  6.  
  7. var vMonth : Number = vDate.getMonth();
  8. var vYear : Number = vDate.getFullYear();
  9. var vDay : Number = vDate.getDate();
  10.  
  11. return vYear + "-" +
  12. (
  13. (vMonth + 1) < 10 ?
  14. "0" + (vMonth + 1)
  15. : (vMonth + 1)
  16. )
  17. + "-" +
  18. (
  19. (vDay < 10) ?
  20. "0" + vDay :
  21. vDay
  22. );
  23. }

URL: http://simplistika.com

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.