在这段代码中需要帮助 [英] Need help in this piece of code
问题描述
大家好
关于我之前的问题需要帮助格式化保存在数据库中的日期时间 [ ^ ]我编写了以下代码,将用户定义的日期时间格式保存在变量。
Dim str1 as new SqlCommand( Seelct test1中的datetimeformat,其中username ='a',con)
con.open()
Dim result as string = str1.executescalar()
datetimepicker1.format = datetimepickerformat.Custom
datetimepicker1.CustomFormat = result
所以我在结果中获取格式。
现在我必须转换使用datetimepicker选择的日期并将其保存到数据库。
但是datetimepicker的日期时间值是链接2013-52-08(格式为yyyy-mm-dd)。为什么52将在月份出现.. ??? < br $> b $ b
请告诉我怎么做..
我想显示变量'result'值
Hi all
With respect to my previous question Need help in formating datetime as saved in database[^] i wrote the below code to save the user defined date-time format in a variable.
Dim str1 as new SqlCommand("Seelct datetimeformat from test1 where username='a'",con)
con.open()
Dim result as string=str1.executescalar()
datetimepicker1.format=datetimepickerformat.Custom
datetimepicker1.CustomFormat=result
So i am getting the format in "result".
Now i have to convert the date selected using datetimepicker and save it to database.
But the date-time value coming at datetimepicker is link 2013-52-08 (for the format yyyy-mm-dd).why 52 is coming at the place of month..???
please tell me how to do that..
I want to show variable 'result' value.
这篇关于在这段代码中需要帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!