Lasso Soft Inc. > Home

[ date->clear ]

Method

[Date->Clear] resets the fields of the date to their default values. This method modifies the date object in-place, and does not output a value.

Fields are specified as parameters to the method, and as many can be specified as desired. If no field is specified then the entire date is reset to default values. The parameters are -year, -week, -day, -hour, -minute, -second, and -millisecond.

  • Syntax
Date Object->clear
Date Object->clear(-year)
Date Object->clear(-month)
Date Object->clear(-week)
Date Object->clear(-day)
Date Object->clear(-hour)
Date Object->clear(-minute)
Date Object->clear(-second)
Date Object->clear(-millisecond)
Examples
  • Beginner

To clear a field in a date object:

Use the [Date->Clear] method. The following example clears the day field from a date, and outputs the default value for the day.

Code

local('d') = date('2011-02-21')
#d->clear(-day)
#d

Result

2011-02-01 03:00:00

Recent Comments

No Comments found

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

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