[SOLVED] Help please

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
ddragas
Forum Contributor
Posts: 445
Joined: Sun Apr 18, 2004 4:01 pm

[SOLVED] Help please

Post by ddragas »

Hi all

What I need is calculation between days in seconds.

First date is 01.01.1970 01:00:00
Second date is 30.12.1899 0:00:00

Reason why I need this is becouse before couple of months I've made web site in php with MySQL database, and php system start date is 01.01.1970 01:00:00. php calculates dates with seconds, and all dates in MySQL database are in format 1090772815 (seconds).

Second date is VB6 system start date.

Now I'm making desktop app in VB6, and need to transform (convert) this (php) format into real dates that VB6 can read.

Please help me
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

scale the dates into alignment.. I don't remember how long it takes for the calenders to fully revolve.. I think it's 28 years. Anyways, figure out where in the cycle 1899 was, then scale it to the same position immediately after 1970.. then use some math or MySQL's TO_DAYS() to convert the differences to actual number of days difference.
User avatar
ddragas
Forum Contributor
Posts: 445
Joined: Sun Apr 18, 2004 4:01 pm

Post by ddragas »

Resolved

Thank you
Post Reply