More Related Resource Links

Execute the following Microsoft SQL Server T-SQL datetime, date and time formatting scripts in Management Studio Query Editor to demonstrate the usage of the multitude of temporal data formats available and the application of date / datetime functions.

Hi I'm retrieving a datetime type of data from sql table databaseMy problem is when I'm retriving it to my textbox it appear something like this -->> 1/10/1990 12:00what i want is to remove the time and appear like this only ---> 1/10/1999 How can I do this?btw I'm using c# Thanks in advance!

Hello,This is probably a very common question. But I have a Text Box that is being populated from the database when the page is loaded. But is displays the time as 8/30/2010 12:00:00 AM. I need this 8/30/2010. In the database is it storing the date and time. I have this which is where the text box is being populated.txt_EventDate.Text = ds.Tables[0].Rows[0]["EventDate"].ToString();How am I able to get rid of the 12:00:00 AM???Thank youvery much!!

Hi,
Can anybody tell me how to load todays date in a textbox in dd/MM/yyyy format
i used this
txtFromDate.Text = DateTime.Now.ToString("dd/MM/yyyy")
I am getting the output as 01-09-2010, but i want my output as 01/09/2010Hi,Can anybody tell me how to load todays date in a textbox in dd/MM/yyyy formati used this txtFromDate.Text = DateTime.Now.ToString("dd/MM/yyyy")I am getting the output as 01-09-2010, but i want my output as 01/09/2010

I have a date in a database which i bring into a repeater using <%#DataBinder.Eval(Container.DataItem, "DBDate")%>. Can I format the datetime which is write to remove the time bit from it. At the moment it is written in this format:25/02/2007 00:00:00. I want it to be 25/02/2007 or even a more readable date such as February 25th 2007.
Thanks
Andrew

I'm trying to format the label of a parameter which is populated by a dropdown in SQL2008 RS. Essentially, i want to put a title in the report which puts the date in the format dd MMM yyyy.
I have tried the following options with no luck:
=Format(Parameters!MyDate.Label, "dd MMM yyyy")
=Format(CDate(Parameters!MyDate.Label), "dd MMM yyyy")
Can this be achieved in this way? I "could" reformat the data in the dataset, but i'd rather explore this avenue first.
TIAevery day is a school day

Hi, I am looking to format a date to format dd/mm/yyyy for a template field but I can't seem to get the syntax right. I think it is because my template field links to the method of an object. The template field is:<asp:TemplateField HeaderText="Date Of Accident"> <ItemTemplate> <%#((AccidentObject)(Container.DataItem)).getAccidDate() %> </ItemTemplate> </asp:TemplateField>And all the the stuff on the internet says to format it bythis format<%# Bind("DOB","{0:D}") %>This doesn't work for me I would say because I am using a method. Any help would be really appreciated. Seamus

I have a table in my SQL DB that is a DateTime table, what I want to do is take the numeric datetime it stores and convert it to a long date (i.e. 12/12/2012 conversts to December 12, 2012). Seaching the forums it looks like the string.format is the way to go and searching for info on that I found http://www.csharp-examples.net/string-format-datetime/ which lists all the different formats but they do not list a formating string to convert to the format I want to use. Does anyone know what format string I would use to convert a numeric date to a long date like I want? And can you show it in a code example because I am not 100% sure I understand the code examples shown on that site.