Showing posts with label mmmm. Show all posts
Showing posts with label mmmm. Show all posts

Saturday, March 24, 2012

Calender Question

Hey, All my calender inputs are done with the ajax calender control, only problem is all the dates are coming up "American-style" ie MMMM d YYYY, is there a bit of code that`ll format this correctly? i just want the date to look like (if its today for instants) 16/07/07

Thanks in advance si!

You can set the format property to "dd/MM/yy" 
<ajaxToolkit:Calendar runat="server" TargetControlID="Date1"CssClass="ClassName"Format="dd/MM/yy"PopupButtonID="Image1" />

When i went to update the test date i got the error :

The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.

Is there a way of formatting the data in the database ? Si!


Here is a link that will help you to format in SQL

http://www.sql-server-helper.com/tips/date-formats.aspx