This is a migrated thread and some comments may be shown as answers.

TEXTBOX DATE FORMAT IS NOT WORKING

3 Answers 559 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
julioo
Top achievements
Rank 1
julioo asked on 15 Jun 2012, 07:42 PM
hi

i am using a textbox to display a date,

the format property in the textbox is "MM/dd/yyyy" it should display for example  5-may-2012 ----->  "05/05/2012"

but it is only showing a digit in day and month ..   "5/5/2012"

i have reviewed the server configuration but it has the same format "MM/dd/yyyy"


HELP ME PLEASE!





3 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 20 Jun 2012, 10:04 AM
Hi,

The Format property uses the standard format in .NET and it should work, so we cannot be sure what is causing the problem on your end. Another way to force formatting of a date is directly in the TextBox expression, use ToString("MM/dd/yyyy") e.g. : = Now().ToString("MM/dd/yyyy")

Regards,
Steve
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

0
julioo
Top achievements
Rank 1
answered on 20 Jun 2012, 01:57 PM
THANK YOU STEVE

i was using the format {0:d} in the textbox, then
i try with custom format like MM/dd/yyyy and it worked perfectly

thanks..
0
Konstantinos
Top achievements
Rank 1
answered on 25 Sep 2017, 09:19 AM

it works perfect for me..

 

right click on textbox /select expression and =Now().ToString("dd/MM/yyyy")

thanks a lot

Tags
General Discussions
Asked by
julioo
Top achievements
Rank 1
Answers by
Steve
Telerik team
julioo
Top achievements
Rank 1
Konstantinos
Top achievements
Rank 1
Share this question
or