My Sql is

select IF(sub_cat_id=2002, ad_post_date, null) as 'ad_sort_field' from
tcuser.ad_details where <SOME_CONDiTION>

+---------------+
| ad_sort_field |
+---------------+
| 2010-05-30    |
| 2010-05-02    |
| 2010-10-07    |
| NULL            |
| 2010-10-15    |
| NULL            |
+--------------------+

Thanks
Pawan


On Tue, Oct 26, 2010 at 4:36 PM, Gora Mohanty <g...@mimirtech.com> wrote:

> On Tue, Oct 26, 2010 at 3:56 PM, Pawan Darira <pawan.dar...@gmail.com>
> wrote:
> > I am using mysql database, and, field type is "date"
> [...]
>
> Could you show us the exact SELECT statement, and some example
> values returned by running the SELECT directly at a mysql console?
>
> Regards,
> Gora
>



-- 
Thanks,
Pawan Darira

Reply via email to