Return to Snippet

Revision: 38202
at December 28, 2010 12:42 by jaredyeo


Initial Code
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
		);
}

Initial URL
http://simplistika.com

Initial Description

                                

Initial Title
AS3 SQL Date Today

Initial Tags
sql, date

Initial Language
ActionScript 3