Discussions

Web tier: servlets, JSP, Web frameworks: MySQL date format in JSP

  1. MySQL date format in JSP (4 messages)

    I get date value from MySQL database in format 2007-02-21 09:15:48.0 and display it in JSP page. I want to display date in format 21.02.2007 09:15:48. How to do this? I tried with util class witch convert date but it didn't work. I am using Struts framework. Thank you.

    Threaded Messages (4)

  2. Re: MySQL date format in JSP[ Go to top ]

    hi Dejan, There could be 2 approaches to solve it: 1) Change the Query Result: Why don't you change the output of your query to be same as what you need to display at your browser. you can use functions like – “date_format” at the mySql query 2) Manipulate the date at the jsp ( by sing some java code/logic , or using Java Date Format). All the best! ~Anil
  3. Re: MySQL date format in JSP[ Go to top ]

    Thank you.
  4. MySql Date retrieving format[ Go to top ]

    hi buddies i have one problem.. it is possible to retrive the date from MySql in the format 23rd june 2007. but i need the suffix (rd) after date as superscript.. is it possible.. we have to retrieve the result from the query.. can any one help me...
  5. MySql Date retrieving format[ Go to top ]

    hi buddies i have one problem.. it is possible to retrive the date from MySql in the format 23rd june 2007. but i need the suffix (rd) after date as superscript.. is it possible.. we have to retrieve the result from the query.. can any one help me...