从DateTime到TimeStamp的DateTime转换 [英] DateTime conversion from DateTime to TimeStamp

查看:841
本文介绍了从DateTime到TimeStamp的DateTime转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个aspx页面,其中有一个当前按钮.当用户单击此按钮时,我需要将当前日期时间存储在一个表中,其中列是oracle数据库中的时间戳格式.但是aspx中的时间格式是datetime.我如何解决这个问题?

I have a aspx page where there is a present button. When a user clicks this button I need to store the current date time in a table where column is of timestamp format in oracle database.but the format of time in aspx is datetime. How do i resolve this??

推荐答案

http ://www.bigresource.com/Tracker/Track-ms_sql-zSr9DxyY/ [
http://www.bigresource.com/Tracker/Track-ms_sql-zSr9DxyY/[^]

Also, please post the error that you are getting.


您好,

在表中插入日期时,您将日期转换为时间戳格式.
以下查询可能会对您有所帮助.
Hi,

when you insert date into the table you hav to cast date into timestamp format.
Following query may help you.
SELECT CAST(date1 AS TIMESTAMP) "Date" FROM t;


date是日期类型中的日期.


date is your date in date type.


这篇关于从DateTime到TimeStamp的DateTime转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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