如何在msaccess数据库中保存日期时间格式 [英] how to save the date time format in msaccess database

查看:127
本文介绍了如何在msaccess数据库中保存日期时间格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

数据库设计如下



字段名称数据类型

输入日期日期时间



在数据库中,我想在数据库中保存输入日期。



重要说明:在设计输入日期不存在,也不是必需的。





自动我想在数据库中保存输入日期。





问候,

Narasiman P.

解决方案

保存MS Accessdatabase中的日期时间格式 [ ^ ]正如Richard在上面的评论中所建议的那样,你添加

 string.Format(#{0}#,DateTime.Now.ToString( dd-MMM-yyyy))

到你的sql插件的末尾


Database Design as follows

Field Name DataType
Entered Date DateTime

In database i want to save the Entered Date in Datbase.

Important Note:In Design Entered Date is not there and is also not required.


Automatically i want to save Entered Date in the database.


Regards,
Narasiman P.

解决方案

See your own code at save the date time format in MS Accessdatabase[^] where as Richard has suggested in the comment above you add

string.Format ( "#{0}#", DateTime.Now.ToString ( "dd-MMM-yyyy" ) )

to the end of your sql insert


这篇关于如何在msaccess数据库中保存日期时间格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆