troubleshooting Question

Convert datetime variable from VBScript to PHP and back again

Avatar of Swafnil
SwafnilFlag for Germany asked on
PHP
4 Comments1 Solution533 ViewsLast Modified:
Hi there,

i tried to solve this riddle by myself, but I didn't find the right way ... let me first tell you a bit about the background of my task:

I recently started to redeisgn an existing Active Server pages application and chose to use PHP instead of ASP (I definitely prefer PHP and so does my company). The page redesign won't take so long, but I need to use COM objects (written in Delphi) that were called within the ASP scripts and now I'm stuck in calling one of the COM objects that needs a datetime variable as a parameter (for those who know a bit about VBScript: a text string is converted through the method "CDate" and the result is then past as parameter) in PHP.

One major problem seems to be that both languages use totally different starting points when counting the time (ASP starts counting from 1899/12/30 00:00:00 AM, whereas PHP seems to count from 1970/01/01 00:00:00 GMT) and also different variable types.

I can't think of a reliable solution at this time, that's why I decided to bother you with this question. I would be glad to hear your suggestions for this problem!

Bye!

Sascha
ASKER CERTIFIED SOLUTION
DarthMod

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros