Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Works in VFP 7 but not in VFP 6
Message
From
23/05/2002 09:14:54
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00660000
Message ID:
00660392
Views:
13
>Kirk,
>
>In addition to Cetin's code, if you set each property individually, make sure that you set the .Day property to 1 first. Then set the Year and Month, then set the day to the intended day. Otherwise if the previous value of the day property is 31, when you are changing the month, you will get an error if the new month does not have 31 days in it.
>
>
>thisform.olecontrol1.objECT.Day=1
>thisform.olecontrol1.objECT.Month=MONTH(DATE())
>thisform.olecontrol1.objECT.Day=DAY(DATE())
>thisform.olecontrol1.object.Year=YEAR(DATE())
>
>
>HTH,
>Kurt

Kurt,
I intentionally set year to 2000 first because it's a well known leap year.

ie:
Current : ^2002/01/17
Attempting to set : ^2004/02/29

PS: Sorry to be picky but if that saves one time than worth at it :)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform