Oracle of dating
23-Jun-2020 10:55
First, I'll code a routine that converts a positive decimal number into any other base up to base 36 (extending the algorithm used to represent numbers up to base 16). Code Listing 3: Converting decimals up to base 36 create or replace function to_base( p_dec in number, p_base in number ) return varchar2 is l_str varchar2(255) default NULL; l_num number default p_dec; l_hex varchar2(50) default '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'; begin if ( trunc(p_dec) create or replace function to_dec ( p_str in varchar2, p_from_base in number default 16 ) return number is l_num number default 0; l_hex varchar2(50) default '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'; begin if (p_from_base = 16) then l_num := to_number( p_str, rpad('x',63,'x') ); else for i in 1 ..
length(p_str) loop create or replace function to_hex( p_dec in number ) return varchar2 is begin return to_char( p_dec, 'fm'
Thanks to all of the online participants for coming up with some good ideas.
The reason: If you try to install two applications in the same database and their date formats conflict, you won't be able to use both applications without setting the date formats explicitly, which will prevent consolidation in the future.