datetime

  1. S

    Problem with comparing dates and times

    Hi All, I have a problem trying to compare two dates in vb.net... is there a bug in .net?? Please see attached code... you can see the values in the two date variables, but the result of the if statement is going to 'else'... i thought = 0 means the two are equal??? Any help would be very much...
  2. D

    converting and formatting datetime

    Hi, I am very new to programming in visual basic. I'm working on an asp.net page and I have a value I'm pulling from a sqlserver database named "LastUpdatedDate" this is coming over as a string which I'm then trying to put into a datetime format so I can run a search for that same time in...
  3. jmfrank63

    Question DateTime as Optional Parameter in Constructor

    Hello Community, this is my first time and my first question, so if I do something wrong please notify me. I am trying to build a class with a date as optional parameter. If none is given the current date shall be assumed. Since optional parameters require a default value I tried the...
  4. N

    Question Parsing a complete date

    I have dates from a data file that I need to parse. Here is an example of one of the dates and what I have so far: DateTime.ParseExact("2013-01-26T02:43:55+0000","yyyy-MM-dd\THH:mm:ss", As you can see, the date includes the timezone offset (the "+0000" part at the end). I am not sure how to...
  5. cwnonthehill

    Question Filter DataGridView by string in format of MMddyyyy

    ok, guys, I have a SQL database with a column called "Date" but with a format of "nchar(8)" so examples of field data are... 12112012 01012013 02022013 etc... In VB i have a DGV that is databound to this sql table. So, my second column in the DGV is the same as what i have explained above...
  6. L

    Question DateTime issues

    Hi guys, I have been struggling with this problem for several hours now and can't find the reason for the error message... I am reading a datetime string from a txt file, it returns this: "01/31/2011 6:13 AM" Now, I want to convert this string to datetime format. I don’t want to change the...
  7. C

    Question Inserting Dates into MSSQL DB

    Hello Guys I am trying to insert a date into a MSSQL database which is set to a DateTime field but it always inserts in at 01/01/1900 I am using a masked text box that is set to the short date mask. Any ideas? Also when I try to set a default date on a datetime field it will also insert as...
Back
Top