Click here to Skip to main content
15,886,963 members
Home / Discussions / C#
   

C#

 
GeneralRe: application register queries in sql file or in xml files. Pin
Mycroft Holmes7-Nov-14 22:51
professionalMycroft Holmes7-Nov-14 22:51 
QuestionCan we only store Hours and minutes in DateTime Pin
bhausahebshedbale6-Nov-14 16:16
bhausahebshedbale6-Nov-14 16:16 
AnswerRe: Can we only store Hours and minutes in DateTime Pin
Garth J Lancaster6-Nov-14 16:30
professionalGarth J Lancaster6-Nov-14 16:30 
GeneralRe: Can we only store Hours and minutes in DateTime Pin
bhausahebshedbale6-Nov-14 17:39
bhausahebshedbale6-Nov-14 17:39 
AnswerRe: Can we only store Hours and minutes in DateTime Pin
Praneet Nadkar6-Nov-14 17:01
Praneet Nadkar6-Nov-14 17:01 
GeneralRe: Can we only store Hours and minutes in DateTime Pin
bhausahebshedbale6-Nov-14 17:36
bhausahebshedbale6-Nov-14 17:36 
GeneralRe: Can we only store Hours and minutes in DateTime Pin
Garth J Lancaster6-Nov-14 17:47
professionalGarth J Lancaster6-Nov-14 17:47 
AnswerRe: Can we only store Hours and minutes in DateTime Pin
OriginalGriff6-Nov-14 22:44
mveOriginalGriff6-Nov-14 22:44 
Garth J Lancaster wrote:
so, what is wrong with

 

C#
DateTime myTime = new DateTime(0,0,0,HH,MM,0);

 

What, apart from "it won't work?" Laugh | :laugh:
You will get a System.ArgumentOutOfRangeException "Year, Month, and Day parameters describe an un-representable DateTime."

Your second example works - to an extent - but doesn't quite do what he wants as the Year, Month and Day parts of the DateTime will be set to DateTime.Now.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

GeneralRe: Can we only store Hours and minutes in DateTime Pin
Garth J Lancaster6-Nov-14 22:58
professionalGarth J Lancaster6-Nov-14 22:58 
GeneralRe: Can we only store Hours and minutes in DateTime Pin
OriginalGriff6-Nov-14 23:30
mveOriginalGriff6-Nov-14 23:30 
AnswerRe: Can we only store Hours and minutes in DateTime Pin
OriginalGriff6-Nov-14 22:48
mveOriginalGriff6-Nov-14 22:48 
AnswerRe: Can we only store Hours and minutes in DateTime Pin
V.6-Nov-14 23:00
professionalV.6-Nov-14 23:00 
AnswerRe: Can we only store Hours and minutes in DateTime Pin
jschell7-Nov-14 12:43
jschell7-Nov-14 12:43 
QuestionChange TypeDescriptor of property in runtime Pin
Mc_Topaz6-Nov-14 3:49
Mc_Topaz6-Nov-14 3:49 
AnswerRe: Change TypeDescriptor of property in runtime Pin
Eddy Vluggen6-Nov-14 9:45
professionalEddy Vluggen6-Nov-14 9:45 
GeneralRe: Change TypeDescriptor of property in runtime Pin
Mc_Topaz7-Nov-14 2:59
Mc_Topaz7-Nov-14 2:59 
GeneralRe: Change TypeDescriptor of property in runtime Pin
Eddy Vluggen7-Nov-14 3:00
professionalEddy Vluggen7-Nov-14 3:00 
QuestionImage Based Automation Pin
kunteshptechnosoft6-Nov-14 1:07
professionalkunteshptechnosoft6-Nov-14 1:07 
AnswerRe: Image Based Automation Pin
Eddy Vluggen6-Nov-14 9:48
professionalEddy Vluggen6-Nov-14 9:48 
GeneralRe: Image Based Automation Pin
kunteshptechnosoft6-Nov-14 17:15
professionalkunteshptechnosoft6-Nov-14 17:15 
GeneralRe: Image Based Automation Pin
kunteshptechnosoft6-Nov-14 17:46
professionalkunteshptechnosoft6-Nov-14 17:46 
GeneralRe: Image Based Automation Pin
Eddy Vluggen7-Nov-14 3:00
professionalEddy Vluggen7-Nov-14 3:00 
GeneralRe: Image Based Automation Pin
kunteshptechnosoft9-Nov-14 17:21
professionalkunteshptechnosoft9-Nov-14 17:21 
QuestionMicrosoft certification Pin
Mukesh Ghosh6-Nov-14 1:07
Mukesh Ghosh6-Nov-14 1:07 
AnswerRe: Microsoft certification Pin
Richard MacCutchan6-Nov-14 1:28
mveRichard MacCutchan6-Nov-14 1:28 

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.