Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ammar Hadi
  Where is Ammar Hadi?
 Al-Samawah
 Iraq
 Ammar Hadi
 To: Joseph G. Njoroge
  Where is Joseph G. Njoroge?
 Nairobi
 Kenya
 Joseph G. Njoroge
 Tags
Subject: RE: How to store values in DTpicker control
Thread ID: 228339 Message ID: 228359 # Views: 1 # Ratings: 1
Version: Visual FoxPro 9 SP2 Category: Active X Controls & OLE Automation
Date: Monday, May 18, 2009 1:38:38 PM         
   


> Greating from Kenya,
>
> I have a form with DTPicker control which am using to select dates and am able to store the selected date to the table.
>
> My question is, if i want to edit the record stored and contains date values, how do i display the date values from the table on that control (dtpicker control).
>
> Regards,
>
> Joseph

Hi Joseph,

The dtpicker control has a property that is _value, that is used to set the datetime.

oleDateTime._value=yourTable.yourDateTimefield

* this also works if your field is a date field,
* the picker will be set to the date you assign and;
* the time will be set to 0 hour.


note that if you want to show only the date part, just shorten the width of the control so that it will hide the time part.
If you want the picker to be a time picker only, you can assign this by the special properties window that can be called in the last option of the context menu that appear when you right click on the picker control. In this special window there is a Format option from their you can select the format you need.

And if you need to retrieve date form it:
ldDate=TTOD(oleDateTime._value)


also, it has properties: YEAR, MONTH, DAY, HOUR, MINUTE, SECOND to retrieve each.

Hope this helps

Ammar Hadi ................IRAQ

My Foxite Weblog

---------------
I I I really love foxite
___________________________

ENTIRE THREAD

How to store values in DTpicker control Posted by Joseph G. Njoroge @ 5/18/2009 11:24:35 AM
RE: How to store values in DTpicker control Posted by Cetin Basoz @ 5/18/2009 11:39:00 AM
RE: How to store values in DTpicker control Posted by Joseph G. Njoroge @ 5/18/2009 12:03:25 PM
RE: How to store values in DTpicker control Posted by Cetin Basoz @ 5/18/2009 12:07:04 PM
RE: How to store values in DTpicker control Posted by Joseph G. Njoroge @ 5/18/2009 2:15:46 PM
RE: How to store values in DTpicker control Posted by Cetin Basoz @ 5/18/2009 4:49:58 PM
RE: How to store values in DTpicker control Posted by Joseph G. Njoroge @ 5/19/2009 7:13:12 AM
RE: How to store values in DTpicker control Posted by Ammar Hadi @ 5/18/2009 1:38:38 PM