Click here to Skip to main content
15,913,685 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to provide the Search option Pin
Pete O'Hanlon9-Jan-07 0:32
mvePete O'Hanlon9-Jan-07 0:32 
QuestionByteArray To Image Pin
AB77718-Jan-07 22:57
AB77718-Jan-07 22:57 
AnswerRe: ByteArray To Image Pin
Christian Graus8-Jan-07 23:13
protectorChristian Graus8-Jan-07 23:13 
GeneralRe: ByteArray To Image Pin
AB77718-Jan-07 23:21
AB77718-Jan-07 23:21 
GeneralRe: ByteArray To Image Pin
Christian Graus8-Jan-07 23:30
protectorChristian Graus8-Jan-07 23:30 
AnswerRe: ByteArray To Image Pin
J. Dunlap8-Jan-07 23:15
J. Dunlap8-Jan-07 23:15 
GeneralRe: ByteArray To Image Pin
AB77719-Jan-07 0:39
AB77719-Jan-07 0:39 
QuestionFormatting DateTime Pin
GermanDM8-Jan-07 22:47
GermanDM8-Jan-07 22: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 Graus8-Jan-07 23:18
protectorChristian Graus8-Jan-07 23:18 
AnswerRe: Formatting DateTime Pin
Tyler458-Jan-07 23:18
Tyler458-Jan-07 23:18 
AnswerRe: Formatting DateTime Pin
Fedor Hajdu9-Jan-07 0:14
professionalFedor Hajdu9-Jan-07 0:14 
GeneralRe: Formatting DateTime Pin
J4amieC8-Jan-07 23:48
J4amieC8-Jan-07 23:48 
QuestionSQL-DMO. How to use JobFilter in EnumJobs method Pin
Member 6972548-Jan-07 22:05
Member 6972548-Jan-07 22:05 
QuestionManipulating controls in C#2005 Pin
Mr.Sam8-Jan-07 21:50
Mr.Sam8-Jan-07 21:50 
AnswerRe: Manipulating controls in C#2005 Pin
Stefan Troschuetz8-Jan-07 22:25
Stefan Troschuetz8-Jan-07 22:25 
GeneralRe: Manipulating controls in C#2005 Pin
Mr.Sam8-Jan-07 23:42
Mr.Sam8-Jan-07 23:42 
GeneralRe: Manipulating controls in C#2005 Pin
Stefan Troschuetz9-Jan-07 0:13
Stefan Troschuetz9-Jan-07 0:13 
AnswerRe: Manipulating controls in C#2005 Pin
V.8-Jan-07 22:32
professionalV.8-Jan-07 22:32 
AnswerRe: Manipulating controls in C#2005 Pin
Christian Graus8-Jan-07 23:31
protectorChristian Graus8-Jan-07 23:31 
AnswerRe: Manipulating controls in C#2005 Pin
Bekjong9-Jan-07 1:40
Bekjong9-Jan-07 1:40 
GeneralRe: Manipulating controls in C#2005 Pin
Mr.Sam9-Jan-07 2:13
Mr.Sam9-Jan-07 2:13 
GeneralRe: Manipulating controls in C#2005 Pin
Bekjong9-Jan-07 2:23
Bekjong9-Jan-07 2:23 
GeneralRe: Manipulating controls in C#2005 Pin
Mr.Sam9-Jan-07 2:49
Mr.Sam9-Jan-07 2:49 
GeneralRe: Manipulating controls in C#2005 Pin
Bekjong9-Jan-07 2:59
Bekjong9-Jan-07 2:59 
AnswerRe: Manipulating controls in C#2005 Pin
Luc Pattyn9-Jan-07 2:12
sitebuilderLuc Pattyn9-Jan-07 2: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.