A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Android Security Essentials Live Lessons
this week in the
Want to show the TimeStamp on the form, but needs to save it back later
Joined: Aug 02, 2012
Aug 22, 2013 01:35:37
When a complaint form shows up, I'd like to show the timestamp, do I get this from Java or MariaDB,
If from Java, I need to update this value and set the field type to DateTime
If from MariaDB, I need a stored procedure to generate a TimeStamp and display it on the form and save it back later.
Both seems very inlogical, what is the proper way of doing this?
Joined: May 26, 2003
Aug 23, 2013 08:04:31
In Java, "new
()" creates the current date/time. You can then call stmt.setDate(1, new
()) to insert it in your database table.
I'm not familiar with stored procedures in MariaDB, but I'm sure it is possible. "now()" is often a database way of getting the current time.
How To Ask Questions The Smart Way
Blogging on Certs:
SCEA Part 1
Part 2 & 3
Core Spring 3
TOGAF part 1
I agree. Here's the link:
subject: Want to show the TimeStamp on the form, but needs to save it back later
f:convertDateTime and data type conversion
How would I do a all-round searching for all tables of the database?
MariaDb vs Mysql from java developers view!
jframe form issue
TimeStamp.toString() does not work as expected
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014