Sign in to follow this  

[web] string to date conversion in jsp

This topic is 4305 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

If you're just trying to do the current day, mysql has a nice NOW deal that can insert the current date/time into a date or date_time field type.

[Edited by - Omega147 on March 1, 2006 1:36:11 AM]

Share this post


Link to post
Share on other sites

my string will have a date as

yyyy-mm-dd.

i can directly entere it into mysql as string.

but i cant do any date comparision operation before i enter the date into the database..

so how can i convert the strin to date of the YYYY-MM-DD?

Share this post


Link to post
Share on other sites
Try this resource...

http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html

Particularly the DATE_FORMAT function described in there, which I think will give you what you want.

Share this post


Link to post
Share on other sites

This topic is 4305 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this