Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 39321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T14:50:47+00:00 2026-05-10T14:50:47+00:00

I am pulling a long timestamp from a database, but want to present it

  • 0

I am pulling a long timestamp from a database, but want to present it as a Date using Tags only, no embedded java in the JSP.

I’ve created my own tag to do this because I was unable to get the parseDate and formatDate tags to work, but that’s not to say they don’t work.

Any advice?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T14:50:48+00:00Added an answer on May 10, 2026 at 2:50 pm

    The parseDate and formatDate tags work, but they work with Date objects. You can call new java.util.Date(longvalue) to get a date object, then pass that to the standard tag.

    somewhere other than the jsp create your date object.

    long longvalue = ...;//from database. java.util.Date dateValue = new java.util.Date(longvalue); request.setAttribute('dateValue', dateValue); 

    put it on the request and then you can access it in your tag like this.

    <fmt:formatDate value='${dateValue}' pattern='MM/dd/yyyy HH:mm'/> 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am pulling a 'long' value from Session, using a generic property, and it
I have a method for pulling data from a database, and I want it
I am currently pulling start times from an XML file and using a date
I want to know if this web app are using long polling or anything
I am pulling info from an XML file and the div class=long works great
I have written a xml/php document that is pulling from a Magento Commerce database,
I have my spinner pulling from an array,(that works).. What I want to happen
I'm using the GD Library to create images from data I'm pulling from an
I have a query pulling from a database: List<myClass> items = new List<myClass>(from i
The main problem I'm having is pulling data from tables, but any other general

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.