| How do I set a DateTime field to null ?
| Hence set the DateTimePicker to null?
|
| You can't really. You can assign DbNull, but DateTime is a valuetype,
therefore
| no null...
But, if you are using C# 2.0, you can use Nullable<DateTi mewhich can be
set to null and you can detect that, setting the database to DbNull where
appropriate.
Joanna
--
Joanna Carter [TeamB]
Consultant Software Engineer
Will the DateTimePicker accept nullable types?
AFAIK it does expect a DateTime.
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Joanna Carter [TeamB]" <joanna@not.for .spamwrote in message
news:OPglCekqGH A.2256@TK2MSFTN GP03.phx.gbl...
"Shawn Wildermuth (C# MVP)" <swildermuth@ne wsgroup.nospama écrit dans le
message de news: fc24ddbdf9db8c8 78042b9b20c6@ms news.microsoft. com...
>
| How do I set a DateTime field to null ?
| Hence set the DateTimePicker to null?
|
| You can't really. You can assign DbNull, but DateTime is a valuetype,
therefore
| no null...
>
But, if you are using C# 2.0, you can use Nullable<DateTi mewhich can be
set to null and you can detect that, setting the database to DbNull where
appropriate.
>
Joanna
>
--
Joanna Carter [TeamB]
Consultant Software Engineer
>
>
Comment