RadDate选择器日期格式转换? [英] RadDate picker date format conversion?
本文介绍了RadDate选择器日期格式转换?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个telerik日期选择器,它的显示日期早于MMM-yyyy但是当它的保存日期时它以这种格式保存日期7/6/2013 12:00:00 AM
但在我的数据库中我想以这种格式输入日期MMM-yyyy
i我这样做
i have a telerik date picker its display date fromat is MMM-yyyy but when its saving date its saving date in this format 7/6/2013 12:00:00 AM
but in my database i want to enter date in this format MMM-yyyy
i am doing this
Dim s1 As String = [String].Format("{MMM-yyyy}", RadDatePicker1.SelectedDate.Value.ToString("dd/mm/yyyy"))
i我收到以下错误(输入字符串格式不正确。)
i am getting following error (Input string was not in a correct format.)
推荐答案
输入字符串格式不正确。
试试这个---
Dim s1 As String = [String] .Format({ MM-yyyy},RadDatePicker1.SelectedDate.Value.ToString(dd / MM / yyyy))
Your input string not in correct format.
try this---
Dim s1 As String = [String].Format("{MM-yyyy}", RadDatePicker1.SelectedDate.Value.ToString("dd/MM/yyyy"))
试试这个: -
try this:-
Dim strDate As String = Format(CDate(RadDatePicker1.SelectedDate.Value.ToString()), "MM-dd-yyyy")
这篇关于RadDate选择器日期格式转换?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文