How to get date & time in one column?

Discussions

Web tier: servlets, JSP, Web frameworks: How to get date & time in one column?

  1. How to get date & time in one column? (2 messages)

    Hello

    After executing an sql query, I get date & time in one column but I require date in 'dd-mm-yyyy' format, when I give : to_date(datefieldname, 'dd-mm-yyyy' ), time disappears, when I give : to_Char(datefieldname, 'hrs:mm:ss' ), date disappears. How to get both(date & time in one column)

    Looking forward for an early reply.

    Thanks
  2. How to get date & time in one column?[ Go to top ]

    Hi-

    In MySQL, there is a function called DATE_FORMAT which seems to be exactly what you need. If you are using a different database, there is probably something analagous, with a different name. Also, this is probably best suited for a different forum.

    P
  3. How to get date & time in one column?[ Go to top ]

    Hi Paul Morie

    Thanks for info & ya, we need different forum for database.