![]() Here’s what the code looks like (I will explain it after): Suppose that my magic date is January 1, 1900, as I mentioned before. Imagine that I have a report that is designed to show orders that shipped today. □ The magic comes in when I create the condition object that includes that prompt. There’s nothing magical about that prompt. In this prompt I am asking for a shipping date, I am expecting a valid date value, there is no list of values, and the user will enter only one value. It might look something like shipping date','D',mono,free) Once I have selected my magic date I can now create my prompt using the basic five parameters. That is the first important point about this concept: I must pick a date that will never appear as part of my normal data. Quite frequently I will use something like January 1, 1900, as it is highly unlikely that any of my records will include that date as a valid entry. What I do is define a specific date as the magic date. That’s where the concept of a “magic date” comes from. I can’t put the word “Today” in this prompt, as “Today” is not anywhere close to being a valid date. That means that anything entered in that date prompt field has to pass the basic validation that will be done by the application. A ‘D’ designates a prompt as a date value. When I set up a prompt in the universe, one of the required arguments is the datatype. Can I make that happen?įirst, a quick recap. In a nutshell: I need a way to accept a prompt value and convert it to today’s date for user convenience and for scheduling. I have a long series of posts on how to create some dynamic date objects that can be used for scheduling, but those were not prompts. When I schedule a report, I have to provide values for every prompt. It is also essential for scheduled reports, which is something I didn’t really touch on last time. This would allow my users to click-n-go on the report without having to update the date value each time. I would like to be able to provide a default value of today’s date. In case you don’t want to read the entire post, here is the executive summary:Īt the end of that post I mentioned something called a “magic date” that I frequently use in my universes to get past this limitation. 183 AN ARITHMETIC OPERATION ON A DATE OR TIMESTAMP HAS A RESULT THAT IS NOT WITHIN THE VALID RANGE OF DATESĮxplanation: The result of an arithmetic operation is a date or timestamp that is not within the valid range of dates which are between -31.In the first post on designing universe prompts I talked about the idea of having a default date value present in a prompt. 182 AN ARITHMETIC EXPRESSION WITH A DATETIME VALUE IS INVALIDĮxplanation: The specified arithmetic expression contains an improperly used date-time value or labeled duration. Months can be between 01-12, days can be as per the month. 181 THE STRING REPRESENTATION OF A DATETIME VALUE IS NOT A VALID DATETIME VALUE (MM>12, DD>31, 30, 29, 28 depending on the month)Įxplanation: The string representation of a date-time is not in the acceptable range or is not in the correct format. If the column is a VIEW column but it does not have a correspondingīase column, a string of ‘*N’ is displayed. If the column is a VIEWĬolumn and it has a corresponding base column, the VIEW column name isĭisplayed. ![]() For a character column, the column name.The maximum length that is displayed is the length of SQLERRM. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |