473,378 Members | 1,138 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

win32 filetime conversion

Hi,

I need a function to convert a date/time (dd-mm-yyyy hh:mm:ss) to a 64-bit
win32 FILETIME and reversed.
Is this possible with PHP ?

Thansk in advance,

Jane
Nov 26 '06 #1
2 4833
Yeah,
But the only way I can think of doing it is messy.

Use strtotime() to get the Linux timestamp for a date (seconds since
January 1 1970 00:00:00 GMT), then add quite large interger to get it
to the number of seconds since January 1, 1601. Then you need to
multiply this by some factor of 10 to get into 100-nanosecond
intervals.

Sorry, Can't be bothered to do it for you ;)

Btw, strptime() is nicer, but is only php5+

Not sure what your doing with the reverse bit though..

Nov 26 '06 #2
I'll give it a try.
The reverse part is from a 64-bit value to a date/time.

Maybe i need to use some Perl code within my php.

Jane
Nov 30 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Thomas Barth | last post by:
Hi, I'm new to windows programming and still reading a book about windows-programming with C++. I copied the following code from the book into my ide (Eclipse/CDT) to comprehend the code, but two...
3
by: Hanjo Grüßner | last post by:
Hello, I want to transfer a file from a http-server to another. Well, that goes fine like this: $upload = ftp_put($conn_id, "$destination_file", "$source_file", FTP_BINARY); But I want - ...
82
by: zardoz | last post by:
I've got this problem: unsigned long long lTemp; char cLargeNum="1324567890"; sscanf(clargeNum,"%llu",&lTemp); which under Win32 isn't working*. My program needs to compile under posix so...
0
by: Sergey | last post by:
Hi, I need to return c# FILETIME to C++ client. What I understand since we have FILETIME in C# I can just simply return it as: FILETIME GetSomeTime( string anyThing ) This method is...
1
by: aunthas | last post by:
I want to play sound using winapi, so I wrote these lines of code:- ------------------------------------------------------------------------------------------------------------------- using...
1
by: Sneil | last post by:
I know, general answer for my question is: long hFT2 = (((long) ft.dwHighDateTime) << 32) + ft.dwLowDateTime; DateTime dte = DateTime.FromFileTimeUtc(hFT2); where dwHighDateTime/dwLowDateTime...
14
by: msavazzi | last post by:
Hi, it should be simple, put FILETIME in a Long conver it in date using the DateTime.FromFileTimeUtc The help even says: Converts the specified Windows file time to an equivalent UTC time. ...
5
by: rob.zumwalt | last post by:
Hi All, I have written a wrapper around a C++ class to make it available to C#, built into a dll. This has gone just fine, but one of the methods in the C++ class takes a FILETIME pointer as an...
2
by: nabil035 | last post by:
hi, wel I have these vars: double day,month,year,hour,minute,second,millisecond; I want to convert this data to a filetime structure, I don't want of course to convert them manually ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.