473,322 Members | 1,480 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

DateTimePicker and Year 9999

Converting an old application and came accross a funny problem. Have a
subscription DB with a renewal date field. If the subscription is considered
a 'freebee', then it never has to be renewed and the renewal date is null.
Well, discovered that nullableof(Date) does not work well with the
datetimepicker nor with Crystal Reports which won't even recognize that type.
Decided to change these date to 12/31/9999 (which is close enough to never
for me :~)! But, when the datetime picker see's this value, it displays
todays date! In fact, for all dates between 1/1/9999 and 12/31/9999 it
displays todays date. I guess I can make the 'freebee' date = to 12/31/9998
(which works), but am wondering if this is a 'feature' or a 'bug'.
--
Terry
Nov 2 '07 #1
4 4067
Terry,

I what is a bug, I assume that it does not fit in the long, however I assume
that as you look at it that day, then it will be fixed.

Cor

Nov 3 '07 #2

"We" ( company i work for ) discovered a long time ago that 12/31/9998 is
the maximum size you can efectively work with in .Net icw a SQL database
but we did not see this as a problem wel at least not for us :-) , so in our
production systems we use 12/31/9998 as the infinite date value .

Gues it is just the maximum value that it can hold

Michel
"Terry" <Te****@nospam.nospamschreef in bericht
news:D0**********************************@microsof t.com...
Converting an old application and came accross a funny problem. Have a
subscription DB with a renewal date field. If the subscription is
considered
a 'freebee', then it never has to be renewed and the renewal date is null.
Well, discovered that nullableof(Date) does not work well with the
datetimepicker nor with Crystal Reports which won't even recognize that
type.
Decided to change these date to 12/31/9999 (which is close enough to never
for me :~)! But, when the datetime picker see's this value, it displays
todays date! In fact, for all dates between 1/1/9999 and 12/31/9999 it
displays todays date. I guess I can make the 'freebee' date = to
12/31/9998
(which works), but am wondering if this is a 'feature' or a 'bug'.
--
Terry

Nov 3 '07 #3
Hi Terry,

Yes, formatting and parsing between DateTimePicker.MaxDate and DBNull value
is what I mean. This is because the default DateTimePicker does not support
null value.

Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Nov 6 '07 #4
Hi Jeffrey,
Thanks! Works perfectly!
--
Terry
""Jeffrey Tan[MSFT]"" wrote:
Hi Terry,

Yes, formatting and parsing between DateTimePicker.MaxDate and DBNull value
is what I mean. This is because the default DateTimePicker does not support
null value.

Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Nov 10 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

248
by: Generic Usenet Account | last post by:
As per Google's Usenet archives http://groups.google.com/googlegroups/archive_announce_20.html], the first discussion of the Y2K problem on the Usenet was on January 18 1985...
0
by: Ing. Rajesh Kumar | last post by:
Hi everybody I have created a very useful DateTimePicker user control with a calendar and four DropDownLists for Month, Year, Hour and Minute on it. Solution works fine so i was thinking to put it...
2
by: andreas | last post by:
Hi, I have a datetimepicker , format set to time and two strings, the first give me a hour lke "5" and the other the minutes like "15" How can i put these two values in the datetimepicker ?...
2
by: AA | last post by:
Do anyone know how to set null value to DateTimePicker control? I want to not displaying any date on the DateTimePicker, is it possible? Thx in advance! Richard
5
by: DC | last post by:
Hi All, Is there any way to find out which portion of a datetimepicker control in a windows form has been selected? Thanks. DC
3
by: Charlie | last post by:
In the top portion of the DateTimePicker, where the value of the date is displayed, how can I detect whether the month or day or year is currently focused, or, if ShowCheckBox = True, whether the...
1
by: skhairnar | last post by:
Hi All, I am trying to write a validation rule for DateTimePicker, which will prevent user from selecting saturday or sunday as a value. For this I have added an event handler with following code:...
2
by: Todd Carnes | last post by:
I am trying to write an app in C# that requires the user to enter a date from 4000 B.C.E to 4000 C.E. I tried to use the DateTimePicker Control to allow the user to enter the date, but it only...
11
by: jessy | last post by:
Hi, I have a problem with my DateTimePicker javascript code which i downloaded , the problem is when i pick the date and the date appears in my Text Field and i click Submit the date which i picked...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.