o
k
q
u
e
s
t
i
o
n
s
.
c
o
m

help with DateTime.Compare -

hi! can anybody please help me. Why is it when i try to compare two the same dates I was not getting the right return value of Datetime.Compare which 0. I dont know if the problem is in my code or is in the Datetime.Compare method. by the way, i attched a screenshot to give you more idea. Thanks in advance!

 

help with DateTime.Compare -
hi! can anybody please help me. Why is it when i try to compare two the same dates I was not getting the right return value of Datetime.Compare which 0. I dont know if the problem is in my code or is in the Datetime.Compare method. by the way, i attched a screenshot to give you more id


sqlquery to compare a given date with datetime field in a table. -
hi, how to compare a datetime field called date1 with date part alone. i want to compare the date part of the column with date input to select the matching record. show me the query. I want this as a stored procedure in sql server 2000 to access in my prg.


Strange behaviour of a Try Catch statement -
First can i ask if you agree that the followning two pieces of code are the very same so long as when i put a break point on the line compareResult = DateTime.Compare(firstDateX, firstDateY) (in the first piece of code) the programme never stops on it (hence the try always fails) _


date.compare method -
Can someone help? I am using vb.net 2002. I am simply trying to get a number of days stay by comparing two dates. I have the following code: when I break the program to check the values I get #4/10/2007# for d1 and #4/14/2007# for d2, but the compare method returns 1 no matter what


DateTime code -
Can someone tell me what exactly this is doing ? Code: Dim gmtOffset As Integer = DateTime.Compare(DateTime.Now, DateTime.UtcNow) This datetime is used for logging the times errors occur on our site.


ListView Sorting on Clicked Column -
Hi, I have implemented the code from the following url: Link to Sorting Code at Microsoft to sort listview columns dynamically. The pertinant piece of code is: ' Determine whther the type being comapared is a date type Try ' Parse the


DateComparison Problem!!! -
Hi!!! I am trying to filter the records in my recordset, in which the filter column is smalldatetime. the problem is when i write the filter string i need to compare the datetime column value (only date not time) with the available date. I dont know which function in the sq


question about date field -
Hi, I use date picker to let user pick the date and use that date to get a recordset from the SQL server and the field that I try to compare in SQL is defined as datetime stamp field. Do I have convert the dtpicker.value to date format first in order to compare the datetime stamp f


Datetime issue -
i need to compare date times to see if a timeframe has elapased. the datetime is located in a filename with the following format c:\test\test.txt_2007_12_29_22_34_57.txt thats year_month_day_hour_minute_second i cannot control how the filename is formattted the problem i am having


[02/03] Convert string to date -
I want to take the string "04/02/2007" and and the string "04/03/2007" and convert these to dates so I can use the date compare function. I tried something like this but it didn't like that. Error I got was "Input string was not in a correct format."


Datetime question -
Hi, I want to covert string value to datetime in format "MM/dd/yyyy" whatever regional settings are. How to do this? I try with datetime.parse and datetime.parseexact but when sting is like '04.13.2005' I get error 'string was not recognized as valid dateTime'. regard j


SQL Date comparisons *resolved* -
I am in the process of converting some Access queries to SQL & would like to know if there is a function similar to the Access function DATEVALUE() ?? Whereby I can ignore the time value of the Table field as my parameter inputs are in the following format : in access I pass


data and time -
MyDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, DateTime.Now.Hour, DateTime.Now.Minute, DateTime.Now.Second, DateTime.Now.Millisecond); dtDay = MyDate.ToString("MM/dd/yyyy"); dtTime= MyDate.ToString("hh:mm:ss tt&qu


in between date -
hello! i have these data: date item 08/10/2007 07:34 AM data1 08/10/2007 07:35 AM data2 08/10/2007 07:36 AM data2 08/10/2007 09:01 AM data3 how would i find the data in date between 08/10/2007 07:33 AM to 08/10/2007 07:37


How do i get just the day\month\year part out of DateTime -
I just want the DD/MM/YYYY Format from DateTime. This is the first time ive really used DateTime in my code so how would i go about doing this?


SQLDateTime Problem -
Hi, I thought I was clever using SQLDateTime for fields that may be null in my database. It all works fine for reading from/ writing to the database but when I want to use the values in a calculation I can't convert it to DateTime. e.g. Dim Date1 as SQLDateTime = SomeSQLDateTimeVa


Comapre date only(Please help me) Thank You -
Hi, I declare the datatype of field DATETIME in SQL server 7 to datetime. However, when I want to make a comparsion, I only want to comapre the date but not the time. I want this SELECT * from table 1 where DATETIME = '3/28/01' instead of this SELECT * from table 1 where DATE


[02/03] DateTime formatting/concurrency issue -
I think I may be getting a concurrency violation because for some reason my dataset shows the datetime that it pulls from the database as this "7/10/2008 11:16 AM" and the actual datetime for the record in question in the database is "7/10/2008 11:16:43 AM". So,


datetime parse problem -
hi there. I have a field in SQL where it accepts DateTime I have got 2 text boxes in a web based app. (Date and time) and i have made a string in vb.net to concat the 2 with a space between them I have then tried to convert that string to a datetime object and fire it off


validating date in ASP.NET with C# -
i m making a web user control and have some server side control on it .. i hv 2 fields to get date but i couldnt find any DT Picker control in Server side control .. there is only Calendar control btu its too big to fit .. so i let the date entered in normal text box but before sendin


DateTime picker format -
Hi. I am using a datetime picker for mobile device (.NET CF 2.0) but I guess the same thing can be done on the full framework .NET 2.0 I have made a customformat on this datetime picker to show me the date and time together: dd/MM/yyyy HH:MM:ss when it comes to binding values


Getting another computer datetime -
Hi, How to get another computer datetime from my computer?To get datetime of different computer right now i am creating a text file in target computer.And retreive datetime of that file.Is this method is good?All computer in my office have windows 98.Looking for better solutions?


DateTime and default value -
I have many classes that contain variables (and properties to access them) of type DateTime. However, when I access these properties in a form, and they are not initialized, the value shows up as 12:00.... I would like to show nothing or the empty string "". I guess I


DateTime problem with sql 2000 -
Hi all, I was wondering if anyone could help me with a problem I am having with SQL. I am trying to insert the date and time into a couple of fields in a database (Both fields are datetime datatype) as well as a load of other things. I am building up a string called sSql which holds th


ListViewSorter Class - there must be a better way to do this -
Hello, I need to add the functionality to my listview contols so that they can be sorted by clicking on the column headers. In one of my list views I may have a lot of items - like a couple of thousand maybe. The problem I have is in my sorter class in the compare method. I wan


DateTime to Julian Date (Urgent) -
How to convert a DateTime value to a Julian Date value? For example I have a DateTime value "01/01/2005 10:30:45" I want to convert the above datetime value to a julian date value. In MSExcel If we change the cell format to "##############" and enter any date


DateTime -> ODBC.NET -> Access (resolved) -
Okay, I am going crazy over this datetime function. I can't remember or find out how to pass a current datetime stamp through ODBC. DateTime() function isn't supported Date() function returns today's date (no time) CurDate() function isn't supported


Option Compare -
Can anyone give me some insight as to the benefit of using option compare.. i pretty much know what it does.. and that it is compare binary by default... but when should you use option compare text instead?


[2005] Using a DateTime field as part of a Primary Key -
I am trying to perform a Find on a table record where the PK is made up of 3 fields, one of which is defined as a DateTime. My problem is when I read a record that I know exists (although it hasn't been committed to the DB), the Find doesn't seem to recognize that this Key combination


Putting Multiple Arrays In Sync -
I have several UDT arrays. Each UDT contains a DateTime element. However, the date periods for each UDT DateTime element may NOT be the same. For example DAILY one may go from 7:00am to 2:00am and another from 9:00am to 3:00am. For charting purposes (I need to prepare a graph o


Fast Compare -
Dear All, I have two Richtext box in Form . I have typed some word in Each boxex.These Text boxes has arround 100 - to 150 lines each. I want to Fast Binary compare method, which will highlight the First Mismatch with some colour in Each Text box.These Compare sh


Error 166 System.DateTime.TryParse(string, out System.DateTime) -
Hi, I get this error when i write the following line of code: if (DateTime.TryParse(drow[dt.DateCol.Caption].ToString(), resub)) this line executes well on another machine in our network which has the same version of framework as mine. but shows the following error in my machi


Error 166 'System.DateTime.TryParse(string, out System.DateTime) -
Hi, I get this error when i write the following line of code: if (DateTime.TryParse(drow[dt.DateCol.Caption].ToString(), resub)) this line executes well on another machine in our network which has the same version of framework as mine. but shows the following error in my machi


easiest way to compare 2 lists -
what is the syntax for using the compare in vb... ie compare filelist1 to filelist2 and see what files one directory has that the other doesnt


datetime (mysql) to array (php) -
What I want to do is to take a datetime format information in my database and take the datetime from now and substract the datetime in ym database to know when the data was registered in my database. My idea is to find a way to have the year,day,hour... seperated in some variable an


NULL to Datetime in MSAccess -
hi, how doi insert a null value to a datetime field in MS Access table? an empty string and NULL are not accepted. how do i update the already set date value of a datetime filed to null ? pls let me know soon , Regards sanjays


Out of range datetime value! -
Please help me overcome this error! i use SQL Sever for design database. tbl_phieuthu have a filed that data type is datetime when i chose datetime in DTPicker, it have filter datetime equa datetime in database. i format datetime in control panel is (dd/mm/yyyy). when i click comma


Date in stored procedure -
My dates come as this format 1900-01-01 02:46:58.000 and Itry to convert it on my query analyser , it works fine select convert(varchar,cast('1900-01-01 02:46:58.000' as datetime), 101) and returns 01/01/1900 But when I pass it through my sp the date is not getting formatted


[vs 2005] only Date from Datetimepicker -
i have datetime field in sql table i want to write a query in vb.net on only date condition i have set dd/mm/yyyy fromat to datetimepicker now i want to compare the dtp's only date with sql table i am trying like this but not working even after puting format before datetimepicker i


Passing a datetime field as a parameter to Cyrstal Reports -
I need to pass a datetime field to crystal reports as a parameter. I used thecdate function to convert a string datetime value to a date field in VB. But, as the vb datatype is date and cr datatype is datetime.I am getting an error. How do I solve it