Ð ÐÑÐ, 21.07.2004, Ð 10:33, azah azah ÐÐÑÐÑ:
> Hi, 
> I want convert from mysql to postresql, previously
> in mysql the code as below:
> 
> SELECT t2.id, t2.name, date_format(t1.created,\'%W %M %e, %Y - %r\') 
> 
> In postresql no date_format function, we need to use to_char function
> but it still work because still need to put ::date such as
> SELECT to_char('2005-03-27'::date,'DD/MM/YYYY');
> 
> How can i put ::date beside t1.created to get the output?

Just do it:

to_char(t1.created::date, 'DD/MM/YYYY')

-- 
Markus Bertheau <[EMAIL PROTECTED]>


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Reply via email to