Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calendar Class Jeff Baker?
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00269780
Message ID:
00270342
Views:
25
Steve,

You said you had a date type already. The code you posted is somewhat cryptic. If you have a string that you are trying to force into datetime use the new datetime constant type with ^ to make it work better:

ltX = eval( '{^' + lcYear + '-' + lcMonth + '-' + lcDay + ',::}'

You can also use {//,::} as an emtpy datetime constant instead of dtot({})

>>Steve,
>>Use the dtot() function to convert from date to datetime.
>
>Here's what I have now:
>
>set strictdate to 0
>LOCAL lcControl
>lcControl = THIS.PARENT.icDataControl
>IF !EMPTY(THIS.Caption)
>	 &lcControl = DTOT(CTOD(SUBSTR;
>         (DTOS(THIS.PARENT.idCurrentMonth),5,2)+"."+;
>	 THIS.Caption+"."+LEFT(DTOS(THIS.PARENT.idCurrentMonth),4)))
>ELSE
>		&lcControl = DTOT({})
>ENDIF
>THIS.PARENT.Release()	
>
>
>My form field that is expecting the return result is coming up with nothing because I have 'set century on' and 'set date to ansi'. How do I manipulate things from this point? I was 'this close'...
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform