Click here to Skip to main content
15,885,107 members
Home / Discussions / C#
   

C#

 
GeneralRe: c# file directory structure change Pin
classy_dog6-Mar-13 18:45
classy_dog6-Mar-13 18:45 
GeneralRe: c# file directory structure change Pin
Jegan Thiyagesan6-Mar-13 21:17
Jegan Thiyagesan6-Mar-13 21:17 
Questionpass Convert.ToDateTime to date in MysqlDataType Pin
Jassim Rahma6-Mar-13 2:21
Jassim Rahma6-Mar-13 2:21 
AnswerRe: pass Convert.ToDateTime to date in MysqlDataType Pin
Eddy Vluggen6-Mar-13 3:16
professionalEddy Vluggen6-Mar-13 3:16 
AnswerRe: pass Convert.ToDateTime to date in MysqlDataType Pin
OriginalGriff6-Mar-13 4:50
mveOriginalGriff6-Mar-13 4:50 
GeneralRe: pass Convert.ToDateTime to date in MysqlDataType Pin
Eddy Vluggen6-Mar-13 4:58
professionalEddy Vluggen6-Mar-13 4:58 
AnswerRe: pass Convert.ToDateTime to date in MysqlDataType Pin
Wayne Gaylard6-Mar-13 5:03
professionalWayne Gaylard6-Mar-13 5:03 
AnswerRe: pass Convert.ToDateTime to date in MysqlDataType Pin
jschell6-Mar-13 8:42
jschell6-Mar-13 8:42 
Jassim Rahma wrote:
I have a DevExpress DatePicker component in my C# windows for application


Part 1.

Jassim Rahma wrote:
and I have a timestamp or datetime field in MySQL.


Part 2.

A timestamp is not the same as a date. Now if the value was carefully manipulated correctly every time it was inserted into the database then you would have a timestamp, NOT a date, which had a fixed time part.

If and only if that is the case then you can get the date part from C# per the other suggestions and then construct the time part and then do an exact match. Probably. (A range is still probably safer.)

If however the time part varies in the database then you MUST use a range check. So if the user picks 2012-12-31 then you create two timestamp values with the following values

start = 2012-12-30 00:00:00
end = 2012-12-31 00:00:00

Then you do a database comparison like the following

where {column} > start and {column} <= end
Questionplz check my sql code. is it correct ? Pin
Member 103026305-Mar-13 22:38
Member 103026305-Mar-13 22:38 
AnswerRe: plz check my sql code. is it correct ? Pin
Pete O'Hanlon5-Mar-13 22:41
mvePete O'Hanlon5-Mar-13 22:41 
GeneralRe: plz check my sql code. is it correct ? Pin
Member 103026305-Mar-13 23:43
Member 103026305-Mar-13 23:43 
GeneralRe: plz check my sql code. is it correct ? Pin
Pete O'Hanlon5-Mar-13 23:50
mvePete O'Hanlon5-Mar-13 23:50 
AnswerRe: plz check my sql code. is it correct ? Pin
PIEBALDconsult6-Mar-13 16:55
mvePIEBALDconsult6-Mar-13 16:55 
GeneralRe: plz check my sql code. is it correct ? Pin
Member 1030263012-Mar-13 19:15
Member 1030263012-Mar-13 19:15 
QuestionCreate DirectoryEntry Error Pin
arkno15-Mar-13 22:18
arkno15-Mar-13 22:18 
AnswerRe: Create DirectoryEntry Error Pin
Pete O'Hanlon5-Mar-13 22:45
mvePete O'Hanlon5-Mar-13 22:45 
QuestionReplacing items within a string Pin
Goaty651095-Mar-13 13:25
Goaty651095-Mar-13 13:25 
AnswerRe: Replacing items within a string Pin
NotPolitcallyCorrect5-Mar-13 13:33
NotPolitcallyCorrect5-Mar-13 13:33 
GeneralRe: Replacing items within a string Pin
Goaty651095-Mar-13 13:39
Goaty651095-Mar-13 13:39 
GeneralRe: Replacing items within a string Pin
NotPolitcallyCorrect5-Mar-13 14:26
NotPolitcallyCorrect5-Mar-13 14:26 
GeneralRe: Replacing items within a string Pin
Goaty651095-Mar-13 15:30
Goaty651095-Mar-13 15:30 
GeneralRe: Replacing items within a string Pin
SoMad5-Mar-13 23:21
professionalSoMad5-Mar-13 23:21 
GeneralRe: Replacing items within a string Pin
NotPolitcallyCorrect6-Mar-13 2:16
NotPolitcallyCorrect6-Mar-13 2:16 
GeneralRe: Replacing items within a string Pin
Bogza.Anton5-Mar-13 14:45
Bogza.Anton5-Mar-13 14:45 
GeneralRe: Replacing items within a string Pin
Goaty651095-Mar-13 15:32
Goaty651095-Mar-13 15:32 

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.