Thread: To get the name of a weekday in other Language?

To get the name of a weekday in other Language?

From
Csányi Pál
Date:
Hi,

can I get the name of a weekday in Hungarian?

The command that I'm running is:

select to_char(date '2014-08-19','Day');
  to_char
-----------
 Tuesday
(1 row)

Can I get instead of Tuesday the weekday name in Hungarian ( which is Kedd )?

--
Regards from Pal


Re: To get the name of a weekday in other Language?

From
Andreas Kretschmer
Date:
Csányi Pál <csanyipal@gmail.com> wrote:

> Hi,
>
> can I get the name of a weekday in Hungarian?
>
> The command that I'm running is:
>
> select to_char(date '2014-08-19','Day');
>   to_char
> -----------
>  Tuesday
> (1 row)
>
> Can I get instead of Tuesday the weekday name in Hungarian ( which is Kedd )?

Use the TM-prefix, Translation Mode:

test=*# select to_char(date '2014-08-19','Day');
  to_char
-----------
 Tuesday
(1 row)

Time: 0,560 ms
test=*#
test=*#
test=*# select to_char(date '2014-08-19','TMDay');
 to_char
----------
 Dienstag
(1 row)


See:
http://www.postgresql.org/docs/current/interactive/functions-formatting.html
Table 9-22


Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.                              (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly."   (unknown)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°