Insert timestamp value in PreparedStatement

GuestwilliamIamextremelyimpressedwithyourwritingskillsaswellaswiththelayoutonyourweblog。

Isthisapaidthemeordidyoucustomizeityourself?

Anywaykeepuptheexcellentqualitywriting,itsraretoseeagreatbloglikethisonethesedays。

VoteUp1VoteDownReply6yearsagoGuestRyanSurethisisgreatforgettingthecurrenttime,butwhataboutgettinganyothertime。

Saywewantedtogetinputfromauserorsetatimethatwasinthepast。

VoteUp0VoteDownReply1yearagoGuestdobluthIwonder,whyyouarenotjustusingthefollowingstatement:

newjava。

sql。

Timestamp(System。

currentTimeMillis())

ThereisnoneedtoconstructaDateobjectbeforehand。

VoteUp0VoteDownReply5yearsagoGuestchieThiswasagreatquickhelp:itsconcisenessismuchappreciated。