![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
You just need to use Date(Calender1.Value)
Regards, RandomCoder
__________________
Desktop: Pentium D 920 (2.8GHz, 4MB L2 Cache, 800MHz FSB), 1024MB, 256MB Radeon X600, 250GB HD. Device : Axim X51v XScale 624MHz, 3.7" VGA, 64MB SDRAM, 256MB Flash ROM + 1Gb SD. "Defeat never comes to any man until he admits it."Josephus Daniels |
|
||||
|
I think you just have to subtract the current time to the date selected...
somthing like t=calendar1.value-TimeH-TimeM-TimeS
__________________
Paulo Gomes Porto, Portugal PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD PPC: Qtek9000, 1GB SD DLL Version Listing |
|
||||
|
Did I miss something?
Date(Calender1.Value) works for me, then if you want the current time you just need to use Time(Now) If you need the date formated differently then you can use DateFormat to set it the way you want. Regards, RandomCoder
__________________
Desktop: Pentium D 920 (2.8GHz, 4MB L2 Cache, 800MHz FSB), 1024MB, 256MB Radeon X600, 250GB HD. Device : Axim X51v XScale 624MHz, 3.7" VGA, 64MB SDRAM, 256MB Flash ROM + 1Gb SD. "Defeat never comes to any man until he admits it."Josephus Daniels |
|
||||
|
Quote:
__________________
Paulo Gomes Porto, Portugal PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD PPC: Qtek9000, 1GB SD DLL Version Listing |
|
||||
|
RandomCoder, Cableguy,
Thank you both for your quick assistance. Sorry, I should have been more precise. My JulianDate calculation routine accepts date and time in units of Ticks, such as JulianDate(Now). However, when date and time, as selected with a Calendar control for date and NumericUpDown Controls for time, are other than Now then these selections need to be converted to Ticks. I have come to the following solution: JulianDate(DateParse(Date(cal1.Value)) + 1/24 * (numGMHour.Value + numGMMin.Value / 60 + numGMSec.Value / 3600) * cTicksPerDay) The JulianDate routine accounts for time zone and DST. I've spent 2 hours experimenting last night without success but just a few minutes to the solution after reading your responses this morning. Actually, it's my first time to employ the Calendar control, too :-) Thanks a lot guys! Robert |
|
||||
|
Since Alfacen question regarded the Julian calendar, i ask the same about the normal calendar...
Parsing a date string to ticks is straight foward (dateparse), wich gives us the ticks count at t 00H00s of the date... But how to get the now ticks of the day, so that we can compare 2 dates as ticks.... because we cannot compare two dates as strings...(12/02/2008<13/02/2008 does not compute), how can it be achieved with tick? Edit: A possible solution? To get the ticks of the day(today): dateparse(date(now)) can it be this simple?and so complicated, we first have to parse the actual date(ticks) to a string to parse it again to ticks?
__________________
Paulo Gomes Porto, Portugal PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD PPC: Qtek9000, 1GB SD DLL Version Listing Last edited by Cableguy : 02-11-2008 at 11:30 PM. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Calendar Control: I can't see the year. | sloopa | Questions & Help Needed | 4 | 06-25-2008 07:30 PM |
| Calendar control a simple and a complicated question | Cableguy | Questions & Help Needed | 3 | 02-09-2008 06:45 PM |
| Creating a Calendar control dynamically? | willisgt | Questions & Help Needed | 5 | 01-06-2008 10:48 AM |
| Close method for calendar control | specci48 | Basic4ppc Wishlist | 0 | 11-04-2007 09:44 AM |
| Calendar control | BjornF | Questions & Help Needed | 7 | 07-05-2007 08:52 AM |