- This topic has 2 replies, 1 voice, and was last updated 14 years, 9 months ago by .
-
Topic
-
I just found out the convert_date has been deprecated. We are using Cloverleaf 5.6 (it worked in 5.2 from which we are migrating).
Right now the impact is that the command functions but does not provide missing date or time information.
For example to convert the current date time to a time-stamp format (CCYYMMDDHHMMSS) with convert_date one would code:
convert_date dt “” ts 12.
The null above is the date/time to be converted. If it is null, then the data type for the date/time to be formatted (the dt above) is ignored and instead the current date/time is used as the source date/time.
In 5.2 the above worked properly.
In 5.6 only CCYY was returned.
Also there was the potential with convert_date to acquire the missing time portion from the current time.
For example convert_date dt “20091231” ts 12 would provide:
20091231135500 (assuming the current time at execution was 13:00:00).
In 5.6, the time is not provided.
The replacement suggested is to us the Tcl clock command. However, the clock command is not knowledgeable of valid Cloverelaf Data Types.
Thus, although I have not yet begun to construct the use of clock to replace the convert_date functionality, I suspect it will not be as ergonomic as convert_date without a lot more work.
convert_date was very useful when working with Cloverleaf provided data types and converting from one valid data type to another.
I did not get nor did I ask for any explanation as to why this command that has been around at least for 14 years has been deprecated.
I did, however, inquire if there were any other Cloverleaf provided Tcl commands that have been deprecated.
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.
- The forum ‘Cloverleaf’ is closed to new topics and replies.