Lasso Soft Inc. > Home


AuthorDominique Guardiola Falco
LicensePublic Domain
Posted11 Nov 2010
Updated11 Nov 2010
More by this author...


MS Excel uses a numeric format, called Serial Date format, when storing and dealing with dates and times. Serial date is calculated by taking a given date and determining the number of days that have passed since that date and 01-Jan-1900 (actually 00-Jan1900, but don't ask me, I don't know nothing about this).


Sample Usage

//convert a serial date integer from an excel file to a lasso date

//convert a lasso date for inclusion in an excel file

Source Code

Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.

define_tag('excel2lasso_date', -required='s',-type='integer');
	local('t') = date('1900-01-01');
	local('d') = integer(#s - 2);
	local('result') = date(date_add(#t,-day=#d));

define_tag('lasso2excel_date', -required='d',-type='date');
	local('s') = date_difference(#d,'1900-01-01',-day);
	local('result') = integer(#s + 2);


No comments

Please log in to comment

Subscribe to the LassoTalk mail list

LassoSoft Inc. > Home



©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft