【发布时间】:2012-12-31 18:51:36
【问题描述】:
我想在 MS Access 中添加一些日期和时间,但我的日期和时间变量是一个字符串。即
String dt="12/2/2014 9:00 PM"; //this is selected from a calender component and a ComboBox
而 MS Access 字段的类型是(日期/时间)。如何将我的字符串转换为日期/时间类型,以便将其插入到字段中?你能用几行代码说明一下吗?因为我不是java专家。像我想要的东西:
step1:将String转换为日期时间字段
step2: statement.executeUpdate(插入表(Date-Time) Values(??????)
【问题讨论】:
-
你的问题不是很清楚/可读...