Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Schedule Application - Date Arithmetic across Time Zones
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00556751
Message ID:
00556921
Views:
18
Thanks, Sergey;

So, to do arithmetic with a DateTime variable, you're simply adding and subtracting seconds. Good info.

Still, I think I'll keep them seperate in this app.

Michael

>Hi Michel,
>In VFP it can be done this way
ltDt = DATETIME()
>* Get a date part of DateTime
>ldDate = TTOD(ltDt)
>* Get a time part of DateTime im seconds since midnight
>lnTime = ltDt - DTOT(TTOD(ltDt))
>* ...
>* Combine date and time back into DateTime
>ltDtNew = DTOT(ldDate) + lnTime
>
>>I'm putting together an application which will include calendaring for people across the country. I'm planning to allow them to schedule a shared event , but I want the event to show up at the proper time for each time zone.
>>
>>So.... I figure I need to maintain a time zone for each user, and simply subract the proper amount from GMT to store GMT into the events table.
>>
>>Displaying each person's clendar means adding back the difference.
>>
>>Here's my real problem:
>>I've got a DATE pulldown and a seperate TIME pulldown (like Outlook). I was thinking I'd simply use a DATETIME field to store this info, but it's becoming a real PITA to convert the single DATETIME field to and from seperate DATE and TIME pulldowns each time. I'm beginning to think I should just go with a DATE field and a Numeric field to store the time. I'm working from WEB forms, so I'm limited to web form objects.
>>
>>... Unless someone has figured out a nice little conversion function!
>>
>>How have others dealt with this?
>>
>>TIA
Kogo Michael Hogan

"Pinky, are you pondering what I'm pondering?"
I think so Brain, but "Snowball for Windows"?

Ideate Web Site
Previous
Reply
Map
View

Click here to load this message in the networking platform