 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
DonRoop Guest
|
Posted: Wed Jun 22, 2005 2:17 pm Post subject: TDateTimePicker |
|
|
I am trying to write a small program that will project the date 30, 60 or 90
days from the current date. I have tried using TDateTime and DateTimePicker
but cant seem to get it to give me the day and month values independantly.
Can someone help me to write or understand what I should be doing here.
|
|
| Back to top |
|
 |
salamander1965 Guest
|
Posted: Sat Jun 25, 2005 12:34 am Post subject: Re: TDateTimePicker |
|
|
DonRoop wrote:
| Quote: | I am trying to write a small program that will project the date 30, 60 or 90
days from the current date. I have tried using TDateTime and DateTimePicker
but cant seem to get it to give me the day and month values independantly.
Can someone help me to write or understand what I should be doing here.
|
Try looking at the JulianDateToDateTime() and DateTimeToJulianDate()
functions in the VCL Reference help file. A Julian date is a single
number that corresponds to a particular date in a particular year. With
these two functions you should be able to convert to a Julian date, add
the requried number of days, and convert back to TDateTime.
Good luck -- S.
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|