• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how i display date in proper format, which i take from databse timestamp datatype

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have timestamp datatype for date in mysql table, so when i try to display date on on web site it look like,
"2012-07-18 11:40:44.0"- here extra 0 is coming after "11:40:44" i want to remove that....

so i use sql query,

insted of


and i used

to get values from resultset, so that i can display them on browser.

But when i try to run this .jsp page,
my page was display with half information, like i have 4 textfield, label and one submit button on page.
But only first 2 textfield and labels are getting display. the rest of page is not getting display....

Hope you understand whats my error is, if you have suggestion then please help me,
Thanks in advanced
 
Bartender
Posts: 1051
5
Hibernate Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What exactly is displayed in your JSP?
 
Vinod suryawanshi
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First Thank you James Boswell for your reply...

When i run program, half of the jsp page is display, suppose, i have three text box with label indicating what value is in text box. When program run i get only 1 text box with there label. Other text box and label are missing from the output
 
Ranch Hand
Posts: 375
1
Python Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Vinod suryawanshi wrote:First Thank you James Boswell for your reply...

When i run program, half of the jsp page is display, suppose, i have three text box with label indicating what value is in text box. When program run i get only 1 text box with there label. Other text box and label are missing from the output



But we don't know what you are trying to display in those four textboxes... So we can't figure it out... You have just given one <td> element where you are trying to display date... What about the other three???
 
Vinod suryawanshi
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply R. Jain and James Boswell,

Actually i did mistake, i write sql query as,


and use this code to take data from resultset.


So, my mistake is, i forget to gave column name after DATE_FORMAT(date,'%Y-%m-%d %h:%i:%p'),
When i use sql query,

and use below code to fetch data from resultset,


I am getting values in table like,
2012-08-17 10:53:AM

Once again thanks for showing interest R. Jain and James Boswell..... :-)
 
reply
    Bookmark Topic Watch Topic
  • New Topic