Posted By

jaredyeo on 12/28/10


Tagged

sql date as3 today


Versions (?)

AS3 SQL Date Today


 / Published in: ActionScript 3
 

URL: http://simplistika.com

  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. }

Report this snippet  

You need to login to post a comment.