.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

Compare two dates where one is text

Posted By:      Posted Date: October 19, 2010    Points: 0   Category :SharePoint

I have scoured this forum but not found a solution to my problem.  I have an Infopath form (2007) that captures "actual" times vs an SLA time, which is held in a Sharepoint list.  Sharepoint doesn't allow a "Time" format, so I have stored the times as a text string, which is brought in to the Infopath form on load (have also tried date/time format with a ficticious date).  The user then enters the "actual" time and I need to see if the "actual" is later than the SLA (effectively "not on time").  Problem is that the "actual" field is "time" format to ease entry in the form, but what is pulled through from the list is text.  I have tried connecting to the list directly and via XML (using the owssvr.dll method) connecting to a calculated column that in theory formats in time format.  However, when comparing the fields I still get a NaN error.

What approach should I take for this?  Any help would be greatly appreciated.

View Complete Post

More Related Resource Links

compare two dates in Jquery/js

want to compare two dates. pls provide me any live examplewhich is really helpfull

How to Compare Text Column with Today Calculation in view?


I  have 2 columns

Birth Date (DateTime), Birth-Month(Text- Calculated from Birth Date with MONTH([Birth Date]))

Now I want to know who's birthday in this running month?

So How can I implement filter or CAML Query for a view.


Regards, Kashyap Patel http://interview-question-aspnet.blogspot.com/

Drop down list with text and dates


Could someone help me with this problem?

I have a dropdownlist that is bound to an objectDataSource, and the dropdownlist is populated with dates, from records obtained in the database.

But I need to have the default value of the dropdownlist as text saying PLEASE SELECT, however the populated list are dates.

I tried adding appendbounditems to true and manually adding a list item as PLEASE SELECT but it says it is not of date type.

Is there any way I can have a dropdownlist with the first one text saying PLEASE SELECT, and the remaining collection of dates obtained from the database (objectdatasource / sql query)

P.S.  Know of a way to format the dates  to mm-dd-yyyy ? In the SQL Database, it includes times such as 12:00 pm which I really do not need

C# Datagridview cell text compare



I have 2 datagridviews on a form and would like to know if it is possible to compare the text in the 2 views and highlight any differences?

For example:

DG1: Cell A1 Text > This is a test

DG2: Cell A1 Text > This iss some test

Is it therefore possible to highlight "iss" , "some" in red and show the corresponding dgv1 text in green?

I have done this with 2 richtextboxes and cannot work out how to do this with datagridview?

Any help with this is most welcome

Thanks in advance

How to compare asp.net Textbox value is equal to Gridview footer itemtemplate text box on button cli



I have one asp.net textbox and gridview footer template textbox on clicking the button, i need to check the textbox value is equal to gridview footer template textbox value are same....

my aspx page code:-

     <asp:TextBox ID="TextBox3" runat="server" TabIndex="1"></asp:TextBox>

<asp:TextBox id="we" runat="server"  Font-Size="10pt" Font-Names="Palatino Linotype" Font-Bold="True" ForeColor="#000000" Width="106px">

  <asp:Button ID="Button2" runat="server" BackColor="Transparent" BorderColor="Transparent"                      
                        Font-Size="10pt" ForeColor="#FFFFFF" Height="40px" OnClick="Button2_Click" Style="z-index: 101;
                        left: 113px; background-image: url(images/btn_5.png); position: absolute; top: 13px;
                        background-color: transparent" Text="Save" Width="94px" />

AutoCompleteStringCollection for text box in DataGridView 2.0

I have been searching for a way to have autocomplete in a DataGridTextBox
object. There does not appear to be an obvious way to do this like you would
for a TextBox outside of a grid using the AutoCompleteCustomSource. Any
thoughts on how I can add this collection? :)

Built-in Functions - Text and Image Functions in SQL Server

Text and image functions operate on TEXT, NTEXT and IMAGE data types. These data types are deprecated with SQL Server 2005 and should be replaced by VARCHAR(MAX), NVARCHAR(MAX) and VARBINARY(MAX) when possible. Alternatively you can also consider storing large string values using XML data type. Text and image functions are nondeterministic.

Future versions of SQL Server will not support TEXT, NTEXT and IMAGE data types. Columns with TEXT / NTEXT data type do not support commonly used string functions such as LEN, LEFT, RIGHT, etc. Furthermore, due to the large size of TEXT data you''re likely to see performance issues if you store such data in the database. However, at times you can''t help but use the TEXT / NTEXT / IMAGE data types (for example when supporting 3rd party databases when you cannot change the schema) - this is when text and image functions come in handy.

Built-in Functions - Text and Image Functions

Text and image functions operate on TEXT, NTEXT and IMAGE data types. These data types are deprecated with SQL Server 2005 and should be replaced by VARCHAR(MAX), NVARCHAR(MAX) and VARBINARY(MAX) when possible. Alternatively you can also consider storing large string values using XML data type. Text and image functions are nondeterministic.

Conversion of text files from ANSI to UTF-8

reading and writing text files in ANSI format and
writing html-files in Charset ISO-8859-1 (Western Europe).

Text to Voice

Text to Voice and Voice to Text convert

Voice to Text conversion:-

Compare List


i have got two list<string> containing datas

i would like to compare the both list and the result to new list whch does not contains the same data.(basically unique data)

eg shown below..

list A       list b          list c

a             a                 d

b           d                    c

c            f                   e

f            e

plz let me knw..

reference from menubuttons to text parts in article on the same page


Hi, I'm searching now for hours but couldn't find it.Cry

In my menu i have several buttons which (by a <a href..) should go the a part of an article that is in the same form.

Menu button : What is a database should go to the page default.aspx and in there is an article published.
A part of this article is having a piece of text about "what is a database"

Menu button: how to make a query should go to this same article in the same page but then to the part that is have the piece about the query. The next could be an example of what i'm doing:

    <li><a href="default.aspx ?????>what is a database</a></li>
    <li><a href="default.aspx ?????>what is a query</a></li>

Where my question marks are, there should be a connection to that particular piece of text.
In each article part there is an ID="text1" and the second part id="text2"

How shoudl i do that, Should i use a question mark.
Please give me some guidance how to structure the <li> statement or a pointer where I can read about it.


text editor


 I format lines in a .aspx file (source view) the way I can use them, and if I switch to design view or view in browser or debug, the many lines get reformatted to flow all onto one line.

I can't seem to find the correct setting to keep this from happening.

Any suggestions?


Unique text value in databse column


Hi Everyone!

I know this is probably a very basic question but how do I keep a column's text values unique in SQL server (ie for a unique username)?  The column is not an integer it's varchar(50), and it's not the primary key but I could make it the primary key if recommended.

The front end could handle it;  where the user would enter text, it's validated, then a query is done to see if that username is available.  If so, then user can decide to choose it and an insert is done, if not they pick a new username and process repeats.  With this approach, the responsibility of keeping the value unique solely rests on the front end, nothing on the database side.

Is this the correct way to handle this? 

Thank you!


Willing to Write Urdu in my text box


 hi want to write urdu in text box of my application if anyone has the solution how to do this kindly let me know

Change Button Text in Multi Language Website


Hi i developing multi language website

using Master pages

everything fine

Page_Load i set the Text property of Button Control from Resource file

like this

Button1.Text = GetLocalResourceObject("Button1")

then in the button click event i cnage the text of the Button control

Button1.Text = GetLocalResourceObject("Button1_new")

but the text doesn't change and no error messgae

what is the problem how to solve this


How to change text in columns in SSRS?


I need to create a complex report and export it to Excel. 

In the first column header, text is displayed as "Hide Daily Columns", but I need the text to change as "Unhide Daily columns" when I click on it and when the text changes the columns under "daily" header (I have 3 columns under this header) present in the report shud be hidden and only weekly columns shud be visible. Any ideas please. I am new to SSRS and tried out many ways but didn't get it.

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