More Musings on DatesBy Noreen Redden
It always seems as if, at least from a support perspective, there are forces out there that send out mind messages: “Try working with dates today” or “look to add borders.” Lately, we’ve been dealing with a number of date issues, such as how do I deal with dates in Dialogue Manager?
So we’ll get into that in this article, and as a reminder, we’ll look at some functions that might make life a little easier.
First, the ongoing issue of “smart dates” or date-times in Dialogue Manager keeps coming up. Remember that to Dialogue Manager, it is all black and white. There are alpha fields, and there are numeric fields. There is no pesky format to get in our way. If there are only numbers, the format is numeric (and integer to boot), and if there is something other than numbers, it is alpha.
So, all of the subroutines that subtract dates, and are written to work with formats of MDYY, expect an integer that represents the number of days from Dec. 31, 1900, and so will not work if we send over an integer of 09282011, a i8MDYY field. First the date must be converted to the “smart date,” and then we can call the other subroutines. But, beware, the return from a subroutine is also a displacement from base date, so for a human being to read it correctly, it must be translated back to the displayable format.
Click
here to read more, as well as
other articles in this issue. If you have not done so,
subscribe today to receive the WebFOCUS Newsletter in email.