日期插入拼图:: 05/23/76变为12:12:13 [英] Date Insert puzzle :: 05/23/76 becomes 12: 12:13

查看:71
本文介绍了日期插入拼图:: 05/23/76变为12:12:13的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里撕扯我的头发:ACCESS 2000:

当我尝试用新用户选择覆盖日期字段中的日期时

有效日期,例如:05/23/99

我的日期字段更改为TIME我更新了字段

并且没有显示我想要的日期:05/23 / 99


取而代之的是:12:12:03 AM


我疯了 - 甚至考虑将字段转换成文本。字段

是一个短期


这是我的sql语句:


ChangeDate = request.form。 item(" ChangeDate")''// 05/23/76

UpdateSQL =" UPDATE tblListingspriceChanges SET NewPrice =" &安培; NewPrice& ",

ChangeDate =" &安培; ChangeDate& "在哪里PriceChangeID =" &安培; PriceChangeID

''Response.end cnn.Execute(UpdateSQL)


结果如下:


UPDATE tblListingspriceChanges SET NewPrice = 20002,ChangeDate = 05/23/76

WHERE PriceChangeID = 28


以下是ChangeDate Field在Access中的样子:


12:04:07 AM


- 我甚至尝试过Cdate(ChangeDate),但这似乎没有

差异。


- 杰森

I''m tearing out my hair here: ACCESS 2000:

When I attempt to overwrite a date in my date field with a new user selected
valid date eg: 05/23/99
my date field changes to the TIME I updated the field
and does not display my desired date: 05/23/99

Instead it reads: 12:12:03 AM

I am going nuts - even considering converting the field to text. The field
is a SHORT DATE

Here is my sql statement:

ChangeDate = request.form.item("ChangeDate") ''// 05/23/76

UpdateSQL = "UPDATE tblListingspriceChanges SET NewPrice =" & NewPrice & ",
ChangeDate =" & ChangeDate & " WHERE PriceChangeID =" & PriceChangeID
''Response.end cnn.Execute(UpdateSQL)

Here is the result:

UPDATE tblListingspriceChanges SET NewPrice =20002, ChangeDate =05/23/76
WHERE PriceChangeID =28

Here is what ChangeDate Field looks like in Access:

12:04:07 AM

- I have even tried Cdate(ChangeDate) but this appears to make no
difference.

- Jason


推荐答案

不能说如果这是确定的原因 - 我没有使用Access年龄,但

您的日期应该用#分隔。试试看是否会产生

的差异。


Alan


" jason" < JA *** @ catamaranco.com>在消息中写道

news:Ou ************** @ TK2MSFTNGP12.phx.gbl ...
Can''t say if this is the cause for sure - I haven''t used Access in ages, but
your dates should be delimited with #''s. Try that to see if it makes a
difference.

Alan

"jason" <ja***@catamaranco.com> wrote in message
news:Ou**************@TK2MSFTNGP12.phx.gbl...
我正在撕裂我的头发在这里:ACCESS 2000:

当我尝试用新用户覆盖日期字段中的日期
选择有效日期,例如:05/23/99
我的日期字段更改为TIME我更新了字段
并且没有显示我想要的日期:05/23/99

它的内容如下:12:12:03 AM
<我很疯狂 - 甚至考虑将字段转换为文本。该字段
是一个短期

这是我的sql声明:

ChangeDate = request.form.item(" ChangeDate")''// 05 / 23/76

UpdateSQL =" UPDATE tblListingspriceChanges SET NewPrice =" &安培; NewPrice&
",ChangeDate =" &安培; ChangeDate& "在哪里PriceChangeID =" &安培; PriceChangeID
''Response.end cnn.Execute(UpdateSQL)

结果如下:

UPDATE tblListingspriceChanges SET NewPrice = 20002,ChangeDate = 05/23 / 76
在哪里PriceChangeID = 28

这是ChangeDate Field在Access中的样子:

12:04:07 AM

- 我甚至尝试过Cdate(ChangeDate),但这似乎没有什么区别。

- Jason

I''m tearing out my hair here: ACCESS 2000:

When I attempt to overwrite a date in my date field with a new user selected valid date eg: 05/23/99
my date field changes to the TIME I updated the field
and does not display my desired date: 05/23/99

Instead it reads: 12:12:03 AM

I am going nuts - even considering converting the field to text. The field
is a SHORT DATE

Here is my sql statement:

ChangeDate = request.form.item("ChangeDate") ''// 05/23/76

UpdateSQL = "UPDATE tblListingspriceChanges SET NewPrice =" & NewPrice & ", ChangeDate =" & ChangeDate & " WHERE PriceChangeID =" & PriceChangeID
''Response.end cnn.Execute(UpdateSQL)

Here is the result:

UPDATE tblListingspriceChanges SET NewPrice =20002, ChangeDate =05/23/76
WHERE PriceChangeID =28

Here is what ChangeDate Field looks like in Access:

12:04:07 AM

- I have even tried Cdate(ChangeDate) but this appears to make no
difference.

- Jason



试试这个


UpdateSQL =" UPDATE tblListingspriceChanges SET NewPrice =" &安培; NewPrice& ",

ChangeDate =#" &安培; ChangeDate& #WHERE PriceChangeID =" &安培; PriceChangeID

dlbjr


从对其他人的微薄知识中解脱,

产生未知的睿智。
Try this

UpdateSQL = "UPDATE tblListingspriceChanges SET NewPrice =" & NewPrice & ",
ChangeDate =#" & ChangeDate & "# WHERE PriceChangeID=" & PriceChangeID
dlbjr

Unambit from meager knowledge of inane others,
engender uncharted sagacity.


伙计,我不知道:我试过这样做:

ChangeDate ="#" &安培; ChangeDate& "#"

....但是这会产生语法错误。必须有简单的方法来

在Access的日期字段中插入日期....


- Jason

艾伦 < XA ************* @ XparadiseX.XnetX.XnzX>在消息中写道

新闻:好的************** @ TK2MSFTNGP11.phx.gbl ...
Man, I don''t know: I tried doing this:
ChangeDate="#" & ChangeDate & "#"
....but then this generates a syntax error. There has got to be simple way to
insert a date into the date field of Access....

- Jason
"Alan" <Xa*************@XparadiseX.XnetX.XnzX> wrote in message
news:OK**************@TK2MSFTNGP11.phx.gbl...
不能说如果这是确定的原因 - 我没有使用Access年龄,
但你的日期应该用#'分隔。试试看是否会产生差异。

Alan

jason < JA *** @ catamaranco.com>在消息中写道
新闻:Ou ************** @ TK2MSFTNGP12.phx.gbl ...
Can''t say if this is the cause for sure - I haven''t used Access in ages, but your dates should be delimited with #''s. Try that to see if it makes a
difference.

Alan

"jason" <ja***@catamaranco.com> wrote in message
news:Ou**************@TK2MSFTNGP12.phx.gbl...
我在这里撕扯我的头发:ACCESS 2000:

当我尝试用新用户覆盖我的日期字段中的日期
I''m tearing out my hair here: ACCESS 2000:

When I attempt to overwrite a date in my date field with a new user


选择

有效日期例如:05 / 23/99
我的日期字段更改为TIME我更新了字段
并且没有显示我想要的日期:05/23/99

它的内容如下:12:12 :03 AM

我很疯狂 - 甚至考虑将字段转换为文本。
字段是一个简短的日期

这是我的sql语句:

ChangeDate = request.form.item(" ChangeDate")''// 05 / 23/76

UpdateSQL =" UPDATE tblListingspriceChanges SET NewPrice =" &安培; NewPrice&
valid date eg: 05/23/99
my date field changes to the TIME I updated the field
and does not display my desired date: 05/23/99

Instead it reads: 12:12:03 AM

I am going nuts - even considering converting the field to text. The field is a SHORT DATE

Here is my sql statement:

ChangeDate = request.form.item("ChangeDate") ''// 05/23/76

UpdateSQL = "UPDATE tblListingspriceChanges SET NewPrice =" & NewPrice &


",


",

ChangeDate =" &安培; ChangeDate& "在哪里PriceChangeID =" &安培; PriceChangeID
''Response.end cnn.Execute(UpdateSQL)

结果如下:

UPDATE tblListingspriceChanges SET NewPrice = 20002,ChangeDate = 05/23 / 76
在哪里PriceChangeID = 28

这是ChangeDate Field在Access中的样子:

12:04:07 AM

- 我甚至尝试过Cdate(ChangeDate),但这似乎没有什么区别。

- Jason

ChangeDate =" & ChangeDate & " WHERE PriceChangeID =" & PriceChangeID
''Response.end cnn.Execute(UpdateSQL)

Here is the result:

UPDATE tblListingspriceChanges SET NewPrice =20002, ChangeDate =05/23/76
WHERE PriceChangeID =28

Here is what ChangeDate Field looks like in Access:

12:04:07 AM

- I have even tried Cdate(ChangeDate) but this appears to make no
difference.

- Jason




这篇关于日期插入拼图:: 05/23/76变为12:12:13的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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