Source Measuring Component:The measuring component upon which the scratchpad is based. All scratchpad measuring components 'belong' to a user. Using the FX format modifier ensures that the TO_DATE function will work only if the passed sting exactly matches the provided format. Scratchpad measuring components are defined by the same attributes as 'regular' measuring components, with the following additional attributes: User:The name of the user who created the scratchpad. For example, TO_DATE(’01-JANUARY-2011′,’DD-MON-YY’) will work even though the date format and the value passed do not match. These function similarly to the chart components for information, see Charts. When we use the TO_DATE function, Oracle automatically tries to convert the passed sting value into a date even if the provided format and the passed string value do not match exactly. The scratchpad drop zone, which lists the attributes currently displayed on the scratchpad The scratchpad visualizations The visualizations available in the scratchpad can include charts, box plots, histograms, and maps. Usage: TO_CHAR(SYSDATE,’FMMonth’), TO_CHAR(SYSDATE,’FMDD’)įX: Format exact. The FM modifier ensures that the spaces and 0s are removed from the formatted value. Similarly, when we use TO_CHAR(SYSDATE,’FMDD’), the day of the month will be displayed in a 0-padded format so that all days are two-characters wide. By default when we write TO_CHAR(SYSDATE,’Month’) the month is displayed in a blank-padded format which ensures that all months are displayed with a constant width (in this case the width of the month with the longest name – September). So, read on.įM: Fill mode used in conjunction with the TO_CHAR function. If you are new to Scratchpad, and want full access as a Scratchpad editor, create an account If you already have an account, log in and have fun READ MORE. I wasn’t aware that when you extract the month from a date, by default the value is displayed in a blank-padded format and if your code doesn’t handle that condition, it might behave weirdly. If you want to use the more traditional most recently published blog entry point you can bookmark this URL for ordinary postings, which is also the URL for the page referenced to the right as All Postings. Needless to say, this was after I burnt my fingers on a piece of code which extracted the month of the year from a given date. This is the entry point for the Oracle Scratchpad a static page that indexes various ‘non-blog’ pages on this site and a few other sites. Recently, I came to know about a couple of date format modifiers.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |