Microsoft
Software
Hardware
Network
Question : C# checking null value in datepicker with check box
Hi I have wrtten a global function as suggested by one of experts here which is as follows
public static object GetDateValue(DateTimePicke
r picker)
{
IFormatProvider format = System.Threading.Thread.Cu
rrentThrea
d.CurrentC
ulture.Dat
eTimeForma
t;
return picker.Checked ? (object)picker.Value.ToStr
ing("dd/MM
/yyyy", format) : DBNull.Value;
}
Now from form, I tried the following but none works
banquethall.Effectivedatet
o = ValidateUI.GetDateValue(da
teeffectiv
edateto) as DateTime?; - This returns null even if datepicker is checked
banquethall.Effectivedatet
o = ValidateUI.GetDateValue(da
teeffectiv
edateto); - This says cannot convert souce type object to system.nulable(system.date
time)
banquethall.Effectivedatet
o = (DateTime?) ValidateUI.GetDateValue(da
teeffectiv
edateto); - This also does not work
Request Help
Answer : C# checking null value in datepicker with check box
Is this steaming directly through the web? Try to reset Explorer in Tools - internet options - advanced - reset.
Random Solutions
Best AV for 2008 R2 64bit
Difference between Icefaces,myfaces,richfaces
in JSF?
filter on tables on Column table
copy outlook express from one pc to new windows 7 pc into outlook 07?
Outlook 2010 NK2 file
OAB not downloading in Outlook in Cached Mode
Urgent - Please Please Help - How can i check if someone has logged in to my account in Facebook and read my emails??
Firefox css border on inside of div when embedding Flash with SWFObject, why?
how to insert with vb.net a date time column in sql server
Deploying local user policies, non-domain