|
518 | 518 |
|
519 | 519 | <para>
|
520 | 520 | <table tocentry="1">
|
521 |
| - <title>Format-pictures for datetime to_char() version.</title> |
| 521 | + <title>Format-pictures for date/time to_char() version.</title> |
522 | 522 | <tgroup cols="2">
|
523 | 523 | <thead>
|
524 | 524 | <row>
|
|
662 | 662 |
|
663 | 663 | <para>
|
664 | 664 | All format-pictures allow use suffixes (postfix / prefix). The suffix is
|
665 |
| - always valid for near format-picture. The 'FX' is global prefix only. |
| 665 | + always valid for a near format-picture. The 'FX' is global prefix only. |
666 | 666 | </para>
|
667 | 667 |
|
668 | 668 | <para>
|
669 | 669 | <table tocentry="1">
|
670 |
| - <title>Suffixes for format-pictures for datetime to_char() version.</title> |
| 670 | + <title>Suffixes for format-pictures for date/time to_char() version.</title> |
671 | 671 | <tgroup cols="3">
|
672 | 672 | <thead>
|
673 | 673 | <row>
|
|
695 | 695 | <row>
|
696 | 696 | <entry> FX </entry>
|
697 | 697 | <entry> FX - (Fixed format) global format-picture switch.
|
698 |
| - the TO_DATETIME / TO_DATA skip blank space if this option is |
| 698 | + The TO_DATETIME / TO_DATE skip blank space if this option is |
699 | 699 | not use. Must by used as first item in formt-picture. </entry>
|
700 | 700 | <entry> FX Month DD Day </entry>
|
701 | 701 | </row>
|
|
714 | 714 | </para>
|
715 | 715 | <para>
|
716 | 716 | '"' - string between a quotation marks is skipen and not is parsed.
|
717 |
| - If you want write '"' to output you must use \\", exapmle '\\"YYYY Month\\"'. |
| 717 | + If you want write '"' to output you must use \\", example '\\"YYYY Month\\"'. |
718 | 718 | </para>
|
719 | 719 | <para>
|
720 | 720 | text - the PostgreSQL's to_char() support text without '"', but string
|
|
776 | 776 | </row>
|
777 | 777 | <row>
|
778 | 778 | <entry> PL </entry>
|
779 |
| - <entry> return plus sign on specified position (if number > 0) </entry> |
| 779 | + <entry> return plus sign on specified position (if number > 0) - PostgreSQL extension </entry> |
| 780 | + </row> |
| 781 | + <row> |
| 782 | + <entry> SG </entry> |
| 783 | + <entry> return plus/minus sign on specified position - PostgreSQL extension </entry> |
780 | 784 | </row>
|
781 | 785 | <row>
|
782 | 786 | <entry> RN </entry>
|
783 | 787 | <entry> return number as roman number (number must be between 1 and 3999) </entry>
|
784 | 788 | </row>
|
785 | 789 | <row>
|
786 | 790 | <entry> TH or th </entry>
|
787 |
| - <entry> convert number to ordinal number (not convert numbers under zero and decimal numbers) </entry> |
| 791 | + <entry> convert number to ordinal number (not convert numbers under zero and decimal numbers) - PostgreSQL extension </entry> |
788 | 792 | </row>
|
789 | 793 | <row>
|
790 | 794 | <entry> V </entry>
|
|
801 | 805 | </para>
|
802 | 806 |
|
803 | 807 | <para>
|
804 |
| - The PostgreSQL to_char() not support absurd to_char(0.1, '99.99') |
805 |
| - --> <ProgramListing> ' .10' </ProgramListing> format. |
806 |
| - </para> |
| 808 | + Note: A sign formatted via 'SG', 'PL' or 'MI' is not anchor in number; |
| 809 | + to_char(-12, 'S9999') produce: <ProgramListing> ' -12' </ProgramListing>, |
| 810 | + but to_char(-12, 'MI9999') produce: <ProgramListing> '- 12' </ProgramListing>. |
| 811 | + The Oracle not allow use 'MI' ahead of '9', in the Oracle must be it always |
| 812 | + after '9'. |
| 813 | + </para> |
807 | 814 |
|
808 | 815 | <para>
|
809 | 816 | <table tocentry="1">
|
|
825 | 832 | <entry><ProgramListing> 'Tuesday, 05:39:18' </ProgramListing></entry>
|
826 | 833 | </row>
|
827 | 834 | <row>
|
828 |
| - <entry> to_char( 0.1, '99.99') </entry> |
829 |
| - <entry><ProgramListing> ' 0.10' </ProgramListing></entry> |
| 835 | + <entry> to_char( -0.1, '99.99') </entry> |
| 836 | + <entry><ProgramListing> ' -.10' </ProgramListing></entry> |
| 837 | + </row> |
| 838 | + <row> |
| 839 | + <entry> to_char( -0.1, 'FM9.99') </entry> |
| 840 | + <entry><ProgramListing> '-.1' </ProgramListing></entry> |
830 | 841 | </row>
|
831 | 842 | <row>
|
832 | 843 | <entry> to_char( 0.1, '0.9') </entry>
|
833 | 844 | <entry><ProgramListing> ' 0.1' </ProgramListing></entry>
|
834 | 845 | </row>
|
835 | 846 | <row>
|
836 |
| - <entry> to_char( 0.1, '090.9') </entry> |
837 |
| - <entry><ProgramListing> ' 000.1' </ProgramListing></entry> |
| 847 | + <entry> to_char( 12, '9990999.9') </entry> |
| 848 | + <entry><ProgramListing> ' 0012.0' </ProgramListing></entry> |
| 849 | + </row> |
| 850 | + <row> |
| 851 | + <entry> to_char( 12, 'FM9990999.9') </entry> |
| 852 | + <entry><ProgramListing> '0012' </ProgramListing></entry> |
838 | 853 | </row>
|
839 | 854 | <row>
|
840 | 855 | <entry> to_char( 485, '999') </entry>
|
|
844 | 859 | <entry> to_char( -485, '999') </entry>
|
845 | 860 | <entry><ProgramListing> '-485' </ProgramListing></entry>
|
846 | 861 | </row>
|
847 |
| - <row> |
848 |
| - <entry> to_char( 485, '09999') </entry> |
849 |
| - <entry><ProgramListing> ' 00485' </ProgramListing></entry> |
850 |
| - </row> |
851 |
| - <row> |
852 |
| - <entry> to_char( 485, 'FM09999') </entry> |
853 |
| - <entry><ProgramListing> '00485' </ProgramListing></entry> |
854 |
| - </row> |
855 |
| - <row> |
856 |
| - <entry> to_char( 485, 'FM999') </entry> |
857 |
| - <entry><ProgramListing> '485' </ProgramListing></entry> |
858 |
| - </row> |
859 | 862 | <row>
|
860 | 863 | <entry> to_char( 485, '9 9 9') </entry>
|
861 | 864 | <entry><ProgramListing> ' 4 8 5' </ProgramListing></entry>
|
|
0 commit comments