Skip to content

Commit 1e5adbf

Browse files
committed
Divider -> separator + add whitespace
1 parent 81fa980 commit 1e5adbf

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

doc/sql.extensions/README.cast.format.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## 1. DATETIME TO STRING
22

33
The following patterns are currently implemented for datetime to string conversion:
4+
45
| Format Pattern | Description |
56
| -------------- | ----------- |
67
| YEAR | Year (1 - 9999) |
@@ -32,8 +33,9 @@ The following patterns are currently implemented for datetime to string conversi
3233
| TZM | Time zone in Minutes (00 - 59) |
3334
| TZR | Time zone Name |
3435

35-
The dividers are:
36-
| Dividers |
36+
The separators are:
37+
38+
| Separator |
3739
| ------------- |
3840
| . |
3941
| / |
@@ -43,7 +45,7 @@ The dividers are:
4345
| 'space' |
4446
| - |
4547

46-
Patterns can be used without any dividers:
48+
Patterns can be used without any separators:
4749
```
4850
SELECT CAST(CURRENT_TIMESTAMP AS VARCHAR(50) FORMAT 'YEARMMDD HH24MISS') FROM RDB$DATABASE;
4951
=========================
@@ -53,6 +55,7 @@ However, be careful with patterns like `DDDDD`, it will be interpreted as `DDD`
5355

5456
It is possible to insert raw text into a format string with `""`: `... FORMAT '"Today is" DAY'` - Today is MONDAY. To add `"` in output raw string use `\"` (to print `\` use `\\`).
5557
Also the format is case-insensitive, so `YYYY-MM` == `yyyy-mm`.
58+
5659
Example:
5760
```
5861
SELECT CAST(CURRENT_TIMESTAMP AS VARCHAR(45) FORMAT 'DD.MM.YEAR HH24:MI:SS "is" J "Julian day"') FROM RDB$DATABASE;
@@ -63,6 +66,7 @@ SELECT CAST(CURRENT_TIMESTAMP AS VARCHAR(45) FORMAT 'DD.MM.YEAR HH24:MI:SS "is"
6366
## 2. STRING TO DATETIME
6467

6568
The following patterns are currently implemented for string to datetime conversion:
69+
6670
| Format Pattern | Description |
6771
| ------------- | ------------- |
6872
| YEAR | Year |
@@ -88,7 +92,7 @@ The following patterns are currently implemented for string to datetime conversi
8892
| TZM | Time zone in Minutes (0 - 59) |
8993
| TZR | Time zone Name or Time zone Displacement (same as TZH:TZM) |
9094

91-
Dividers are the same as for datetime to string conversion and can also be omitted.
95+
Separators are the same as for datetime to string conversion and can also be omitted.
9296

9397
Year, month and day will be taken from current date if these components are not used in pattern (this applies only to data types that contain a date component).
9498

0 commit comments

Comments
 (0)