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

C#

 
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 
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 
No. You can't store "just the hours and minutes" in a DateTime: it requires a Year, Month and Day value which cannot be zeroed. So the best you can do is store the Hours and Minutes together with a sepecific date (And probably DateTime.MinValue would be best as DateTime.Now values are used if not specified).

Personally, I'd use a Timespan, or an integer value representing the seconds since midnight instead.
Using a DateTime implies a number of things which aren't necessarily true.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

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 
GeneralRe: Microsoft certification Pin
Mukesh Ghosh6-Nov-14 17:11
Mukesh Ghosh6-Nov-14 17:11 
GeneralRe: Microsoft certification Pin
Richard MacCutchan6-Nov-14 22:05
mveRichard MacCutchan6-Nov-14 22:05 
Questionfile based username and pass Pin
techker25-Nov-14 11:16
techker25-Nov-14 11:16 

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.