Lasso Soft Inc. > Home


[Date] creates a date in Lasso date string format or converts a date from any format to the internal Lasso date string format.

The tag starts with a base date which should either be in Lasso date string format (mm/dd/yyyy hh:mm:ss) or should be in the format specified by the -DateFormat keyword/value parameter.

The base date can be modified by optional keyword/value parameters that override specific parts of the date string.

%D U.S. date format: (mm/dd/yy).
%r 12-hour time format (hh:mm:ss [AM/PM]).
%T 24-hour time format (hh:mm:ss).
%Y 4-digit year.
%y 2-digit year.
%m Month number (1=January, 12=December).
%B Full English month name (e.g. "January").
%b Abbreviated English month name (e.g. "Jan").
%d Day of month (1-31).
%w Day of week (1=Sunday, 7=Saturday).
%A Full English weekday name (e.g. "Wednesday").
%a Abbreviated English weekday name (e.g. "Wed").
%H 24-hour time hour (0-23).
%h 12-hour time hour (1-12).
%M Minute (0-59).
%S Second (0-59).
%p AM/PM for 12-hour time.
%z Time zone offset in relation to GMT (e.g. -0800).
%% A percent sign.

By default, all input is assumed to be zero padded to two characters. For example, 02/03/2002.

A hyphen - between the % and the letter code instructs Lasso not to look for padding. For example, 2/3/2002

An underscore _ between the % and the letter instructs Lasso to to look for padding with spaces. For example, 2/ 3/2002.

  • Syntax
  • Parameters
[Date: Base Date,

[Date:Base Date, -DateFormat=Date Format]
Optional Parameters
Base Date Any un-named parameters are assumed to be a date which will be the basis of the returned date after it has been modified by the named parameters. These parameters are read in according to the format specified in the 'DateFormat' parameter.
Second Specifies the seconds of the day.
Minute Specifies the minutes of the day.
Hour Specifies the hour of the day.
Month Specifies the month of the year.
Day Specifies the day of the month.
Year Specifies the year.
DateGMT Specifies the input date is to be treated as GMT.
DateFormat Specifies the format in which all un-named date parameters will be passed.

To import a date field from MySQL:

Use the [Date] tag with an appropriate -DateFormat parameter. The format for MySQL dates is %Y-%m-%d %H:%M:%S. The following example imports a date from a field named Modified_Date.

The return value is the date formatted in Lasso date string format.

[Date: (Field: 'Modified_Date'), -DateFormat='%Y-%m-%d %H:%M:%S']
3/4/2001 12:34:56
Tag Link [Date] Category Date
Type Substitution Data Source Any
Support Preferred Version 3.0
Output Type Date String Security None
Implementation Sets Lasso 5.0,LDML3x

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