.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

datetime conversions (en-GB) (en-US) giving errors using calendar extended textbox

Posted By:      Posted Date: October 19, 2010    Points: 0   Category :ASP.Net

I have a site which is in en-GB culture (cannot be changed) and provides dates via a textbox with a calendar extender in this format  DD/MM/YYYY. This then populates an sqlparameter

The db server is in en-US and expects dates in this format:  YYYY-MM-DD 00:00:00.000

I have tried many many different methods to get this converted, ready to submit to db but am being presented with errors. Please can you show me the necessary syntax?



View Complete Post

More Related Resource Links

HoverMenuExtender is giving me the error SYS.Extended.UI.PositioningMode.Aboslute is null or not an


Here is my Code....Any thoughts on what I am doing wrong? I pulled in the Ajax Tookit based on the instructions then was following the HoverMenuExtender tutorial.

Any info would be greatly apprecated!

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <form id="form1" runat="server">
<asp:ScriptManager ID="asm" runat="server" />
      <asp:Repeater ID="rpOrders" runat="server">
          <br />
          <asp:Panel ID="myPanel" runat="server" Width="400px" BackColor="Lime" BorderWidth="1px">
              <%#DataBinder.Eval(Container.DataItem, &quo

Datetime format in textbox

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!

Calendar and grouped view causes errors

Hello, I've come across a bizarre situation on a standard web part page. First I add a simple (or so I thought) document library web part with a view grouped on a column. The view is collapsed. Then, I add a calendar view to a page. Immediately, my grouped doc lib view turns into a site navigation web part with no resemblance to the doc lib. If I change the doc lib view to a non-grouped view, all is well again. I've built three different pages on different sites and can re-create this problem every time. If I change the Calendar web part to a detail rather than a calendar view, the page goes back to normal. Any idea what is going on here or how I can mix a calendar and a grouped view on the same page?   Thanks.

Scheduled Backup suddenly started giving errors




I have scheduled full backup daily at morning 6:00. It was running fine till yesterday. Suddenly today morning it failed giving following error....


I have executed maintenance plan manually and again it gave same error....


10/19/2007 11:03:10,FullDBBackup.Subplan_1,Error,1,*****,FullDBBackup.Subplan_1,Subplan_1,,Executed as user: ****\SYSTEM. ...9.00.3042.00 for 32-bit  Copyright (C) Microsoft Corp 1984-2005. All rights reserved.    Started:  11:03:10 AM  Error: 2007-10-19 11:03:10.98     Code: 0xC0010018     Source: Back Up Database (Full)      Description: Error loading a task. The contact information for the task is "Back Up Database Task; Microsoft Corporation; Microsoft SQL Server v9; ? 2004 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1". This happens when loading a task fails.  End Error  Error: 2007-10-19 11:03:11.25     Code: 0xC00291EC     Source: {C7FB73D1-ADF1-42C0-B3D5-9F8014CC206B} Execute SQL Task     Description: Failed to acquire connection "Local server connection". Connection may not be configured correctly or you may not have the right permissions on this connection.  End Error  Warning: 2007-10-19

handle datetime textbox


how can i type the ddmmyyyy HHss that the system will recongite to dd/mm/yyyy HH:ss

automatically add the separator as '/' between day,month and yyyy and add ':' between HH and ss

Set Calendar Extender's SelectedDate="<%=DateTime%>"


Hi.  How do you set an AJAX Calendar Extender's SelectedDate property equal to the current date, using HTML?  I've tried this:


But it generates the runtime error ""Parser Error Message: Cannot create an object of type 'System.Nullable`1[[System.DateTime, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089]]' from its string representation '<%=DateTime%>' for the 'SelectedDate' property.


Is it possible to set this property in HTML without writing code?


reportviewer date parameter and calendar.. not working and javascript errors??



Hi, I've got this ssrs 2005 report that works great passing a few
security related parameters from asp.net codebehind. However, there
are two date related parameters that won't be coming from my web form,
but rather from the report form itself. When I test the report's date
parameters from visual studio it work fine, but when I attempt the
same report from a reportviewer no matter what input I place on the
report's date fields or even if I select the date picker, the report
simply resets to default and reloads. And actually the date picker
from the reportviewer does not not even pop up.


Here's my aspx code:

<%@ Page Language="VB" AutoEventWireup="false"
Inherits="_ReportViewer" MasterPageFile="~/Main/MasterPage.master"
    CodeFile="~/Reports/CashSales.aspx.vb"  Title="Cash Sales" %>

<%@ Register Assembly="Microsoft.ReportViewer.WebForms,
Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Content1"

Search crawl extended by several hours but returned no errors.


My ssp ran a full crawl last night for 8 hours before stopping this morning. It normally takes 15 to 20 minutes. Looking at the Recently Completed Crawls in the SSP admin page, the number of items has stayed about the same and there have been no errors in this week or any of the previous logs. Yet the last run took drastically longer.

I'm not very adept at dealing with the logs. With there not being any errors to point to in the log itself, where is the next place to look for causes?


SSRS Reports deployed on sharepoint giving Permission Errors.


Dear All

We recently migrated our sharepoint from standalone to distributed environment.Everything is working fine except SSRS reports.

MOSS is on Server X and Databases,Report Server is on Database Y

Report Server is configured to run in SharePoint integrated mode.

Central Admin Settings are set as recommended by microsoft for distributed environment.

When i try to access reports or Report DataSource i get this error.


An unexpected error occurred while connecting to the report server. Verify that the report server is available and configured for SharePoint integrated mode. --> The permissions granted to user 'EMS\bmsadmin' are insufficient for performing this operation. ---> Microsoft.ReportingServices.Diagnostics.Utilities.AccessDeniedException: The permissions granted to user 'EMS\bmsadmin' are insufficient for performing this operation.  

I have looked around everything and all setting seems fine. Single Domain Account is used for all services and Report Server service account as well.







Textbox Editable GridView in ASP.NET

This article describes how I made a fully editable gridview in C# using ASP.NET 2. The idea is that the GridView looks and works like an Excel spreadsheet. You see all the cells in the table, and you can edit any of the cells you like, and they are automatically updated (i.e. saved to the database). This is very often how people expect data tables to work in web pages, and I've often seen people clicking in vain on un-editable gridview cells, somehow expecting to edit them, and not understanding that they need to click an Edit button at the end of the row.

Highlighting Rows with TextBox OnFocus

In another article I explained that how you can make the rows of the GridView control clickable and highlight them when they are clicked. In this article I will explain that how you can highlight the GridView rows when you focus on the TextBox which is contained inside the GridView control.

How To Add calendar control inside a GridView

This article show hot to add calendar control inside a GridView with code in c#

Using ATLAS PopUp Control with Calendar inside the GridView Control

In this video tutorial Mohammad demonstrates how you can access the Calendar control which is displayed using the ATLAS PopUp control inside the GridView control.

Custom Editing Behavior for DataGridView TextBox Columns

For various reasons I'm using a DataGridView instead of a ListView, and while configuring the DataGridView to look like a ListView wasn't much of a problem, there's one thing that got on my nerves, which is the behavior of textbox cells in edit mode: It is much too easy to leave the edit mode accidentally, simply by pressing the cursor keys at the wrong time. For example when the text caret is positioned behind the last character of the textbox cell content, and you press the right arrow key

How to format datetime & date with century?

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.


Editable Gridview with Textbox, CheckBox, Radio Button and DropDown List

This is an example of an editable gridview containing different ASP.NET controls. When user wants to edit values in gridview, she/he can use these controls to edit existing values in Gridview Edit Mode.

Using the Code

Essential SQL Server Date, Time and DateTime Functions

The essential date and time functions that every SQL Server database should have to ensure that you can easily manipulate dates and times without the need for any formatting considerations at all.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend