Click here to Skip to main content
15,843,727 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to provide the Search option Pin
Pete O'Hanlon9-Jan-07 1:32
subeditorPete O'Hanlon9-Jan-07 1:32 
QuestionByteArray To Image Pin
AB77718-Jan-07 23:57
AB77718-Jan-07 23:57 
AnswerRe: ByteArray To Image Pin
Christian Graus9-Jan-07 0:13
protectorChristian Graus9-Jan-07 0:13 
GeneralRe: ByteArray To Image Pin
AB77719-Jan-07 0:21
AB77719-Jan-07 0:21 
GeneralRe: ByteArray To Image Pin
Christian Graus9-Jan-07 0:30
protectorChristian Graus9-Jan-07 0:30 
AnswerRe: ByteArray To Image Pin
J. Dunlap9-Jan-07 0:15
J. Dunlap9-Jan-07 0:15 
GeneralRe: ByteArray To Image Pin
AB77719-Jan-07 1:39
AB77719-Jan-07 1:39 
QuestionFormatting DateTime Pin
GermanDM8-Jan-07 23:47
GermanDM8-Jan-07 23:47 
Hi,
Ok now this is just weird. i used this line of code everyday and worked fine and suddenly this morning just threw an error in my face D'Oh! | :doh:
<br />
DateTime dt = Convert.ToDateTime(cpCreateDate.SelectedDate.ToString("dd/MM/yyyy"));<br />

ok the cpCreateDate control is a datetime picker and the value is for example
"09/01/2007 12:00:00 AM"
all i want to do is format it to only the date meaning removing the time to save this to a sql database.

the problem is that as soon as it converts the string back to a datetime value it keeps on adding the time back again and i get this error when trying to write the value to the database:
"The conversion of char data type to smalldatetime data type resulted in an out-of-range smalldatetime value.
The statement has been terminated."


the column in the sql database table is a smalldatetime data type and changing that to normal datetime doesnt resolve this.

please help
thanks
AnswerRe: Formatting DateTime Pin
Christian Graus9-Jan-07 0:18
protectorChristian Graus9-Jan-07 0:18 
AnswerRe: Formatting DateTime Pin
Tyler459-Jan-07 0:18
Tyler459-Jan-07 0:18 
AnswerRe: Formatting DateTime Pin
Fedor Hajdu9-Jan-07 1:14
professionalFedor Hajdu9-Jan-07 1:14 
GeneralRe: Formatting DateTime Pin
J4amieC9-Jan-07 0:48
J4amieC9-Jan-07 0:48 
QuestionSQL-DMO. How to use JobFilter in EnumJobs method Pin
Member 6972548-Jan-07 23:05
Member 6972548-Jan-07 23:05 
QuestionManipulating controls in C#2005 Pin
Mr.Sam8-Jan-07 22:50
Mr.Sam8-Jan-07 22:50 
AnswerRe: Manipulating controls in C#2005 Pin
Stefan Troschuetz8-Jan-07 23:25
Stefan Troschuetz8-Jan-07 23:25 
GeneralRe: Manipulating controls in C#2005 Pin
Mr.Sam9-Jan-07 0:42
Mr.Sam9-Jan-07 0:42 
GeneralRe: Manipulating controls in C#2005 Pin
Stefan Troschuetz9-Jan-07 1:13
Stefan Troschuetz9-Jan-07 1:13 
AnswerRe: Manipulating controls in C#2005 Pin
V.8-Jan-07 23:32
professionalV.8-Jan-07 23:32 
AnswerRe: Manipulating controls in C#2005 Pin
Christian Graus9-Jan-07 0:31
protectorChristian Graus9-Jan-07 0:31 
AnswerRe: Manipulating controls in C#2005 Pin
Bekjong9-Jan-07 2:40
Bekjong9-Jan-07 2:40 
GeneralRe: Manipulating controls in C#2005 Pin
Mr.Sam9-Jan-07 3:13
Mr.Sam9-Jan-07 3:13 
GeneralRe: Manipulating controls in C#2005 Pin
Bekjong9-Jan-07 3:23
Bekjong9-Jan-07 3:23 
GeneralRe: Manipulating controls in C#2005 Pin
Mr.Sam9-Jan-07 3:49
Mr.Sam9-Jan-07 3:49 
GeneralRe: Manipulating controls in C#2005 Pin
Bekjong9-Jan-07 3:59
Bekjong9-Jan-07 3:59 
AnswerRe: Manipulating controls in C#2005 Pin
Luc Pattyn9-Jan-07 3:12
sitebuilderLuc Pattyn9-Jan-07 3:12 

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.