Click here to Skip to main content
15,896,730 members
Home / Discussions / C#
   

C#

 
GeneralRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
rah_sin9-Nov-06 1:33
professionalrah_sin9-Nov-06 1:33 
AnswerRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
Colin Angus Mackay9-Nov-06 1:00
Colin Angus Mackay9-Nov-06 1:00 
GeneralRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
Support1239-Nov-06 1:09
Support1239-Nov-06 1:09 
AnswerRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
Hunuman9-Nov-06 1:29
Hunuman9-Nov-06 1:29 
GeneralRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
Support1239-Nov-06 1:44
Support1239-Nov-06 1:44 
GeneralRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
Colin Angus Mackay9-Nov-06 6:59
Colin Angus Mackay9-Nov-06 6:59 
GeneralRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
Pete O'Hanlon9-Nov-06 1:45
mvePete O'Hanlon9-Nov-06 1:45 
GeneralRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
Support1239-Nov-06 2:12
Support1239-Nov-06 2:12 
No it's winforms. Thank you...i tried your previous example that you gave me...

// Force the culture to English (GB).<br />
CultureInfo culture = new CultureInfo("en-GB");<br />
<br />
DateTime dateTime = Convert.ToDateTime(_appDate+" "+startTime, culture);<br />
DateTime dateTime2 = Convert.ToDateTime(_appDate+" "+endTime, culture);


but this brought back the exact same date "11/09/2006" as when i tried just to
string _fromDateTime = _appDate+" "+startTime;<br />
string _endDateTime = _appDate+" "+endTime;<br />
FromTime = Convert.ToDateTime(_fromDateTime);<br />
ToTime = Convert.ToDateTime(_endDateTime);


but on my friends pc it brings back the value "2006/09/11 02:00:00 PM"

Sorry, in know i'm not explaing enough what my problem is but i'm not even sure what is wrong... its just when i try to compare to dates like in this example: if( _today>=vch.FromDate && _today <=vch.ToDate)
_today has the value of todays date... on my computer it is "11/09/2006" the value of vch.FromDate is "11/09/2006" and the value of vch.ToDate is "11/09/2006"... This if statement should return true... Am i right.

On my computer it returns false... ???? Confused | :confused: that is just one example... another one was yesterday's problem, but some how that sorted itself out... when the selected time "2006/09/11 02:00:00 PM" was writen into the database the the time would be inserted as AM but without the AM if that makes sense (like so: "2006/09/11 02:00:00.000)... Now it writes the time in the db correctly... "2006/09/11 14:00:00.000" Weird but true...

"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison

GeneralRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
Pete O'Hanlon9-Nov-06 2:27
mvePete O'Hanlon9-Nov-06 2:27 
GeneralRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
Support1239-Nov-06 2:32
Support1239-Nov-06 2:32 
GeneralRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
Pete O'Hanlon9-Nov-06 4:14
mvePete O'Hanlon9-Nov-06 4:14 
GeneralRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
Support1239-Nov-06 5:27
Support1239-Nov-06 5:27 
GeneralRe: Is there a setting in visual studio for the Convert.ToDateTime? Pin
Pete O'Hanlon9-Nov-06 9:11
mvePete O'Hanlon9-Nov-06 9:11 
QuestionTo make possible to manage position and size of controls by mouse Pin
wasek20018-Nov-06 23:59
wasek20018-Nov-06 23:59 
AnswerRe: To make possible to manage position and size of controls by mouse Pin
mark_w_9-Nov-06 0:27
mark_w_9-Nov-06 0:27 
QuestionRe: To make possible to manage position and size of controls by mouse Pin
wasek20019-Nov-06 4:31
wasek20019-Nov-06 4:31 
QuestionAbstract collection in property grid Pin
mark_w_8-Nov-06 23:56
mark_w_8-Nov-06 23:56 
AnswerRe: Abstract collection in property grid Pin
Robert Rohde9-Nov-06 0:52
Robert Rohde9-Nov-06 0:52 
AnswerRe: Abstract collection in property grid Pin
mark_w_9-Nov-06 1:27
mark_w_9-Nov-06 1:27 
QuestionWrapping or creating custom XML elements Pin
TUX2K8-Nov-06 23:39
TUX2K8-Nov-06 23:39 
QuestionLike "VS Watch" control Pin
El'Cachubrey8-Nov-06 23:38
El'Cachubrey8-Nov-06 23:38 
Questionhow to select data from the datagrid Pin
Saira Tanwir8-Nov-06 23:22
Saira Tanwir8-Nov-06 23:22 
AnswerRe: how to select data from the datagrid Pin
rah_sin8-Nov-06 23:45
professionalrah_sin8-Nov-06 23:45 
GeneralRe: how to select data from the datagrid Pin
Saira Tanwir9-Nov-06 0:00
Saira Tanwir9-Nov-06 0:00 
GeneralRe: how to select data from the datagrid Pin
rah_sin9-Nov-06 0:15
professionalrah_sin9-Nov-06 0:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.