Jump to content
Sign in to follow this  
Dizzy

Excel and time problems

Recommended Posts

Dizzy

Hi together,

ich have some problems with time settings in excel 2007.

I've created an excel template with time fields like 07:12:00

I would like to compare the times with times out of a txt-file where the time is exactly 07:12:00.

But the displayed time is not the real setting in the excel-field.

If i set the field to "standard" format i'll see "0,300115740740741"

My question is: How can i set the times in excel to have a change to compare?

Thanks for response

Dizzy

Share this post


Link to post
Share on other sites
water

07:12:00 is the FORMAT of the cell whereas 0,300115740740741 is the VALUE of the.

Do you want to use AutoIt to do the comparison or by an Excel formula?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Dizzy

Hi water,

your're right.

I have an excel file with many time formats in one column like

07:00:00

07:00:05

07:00:10

07:00:15

and so on ...

On the other hand i have a text file with timestamps and other values like this:

07:00:00;34;213

07:00:05;12;252

07:00:10;17;301

07:00:15;19;119

Now i want to read the txt-file line by line to fill the corresponding rows in excel.

Do you have an idea?

Thanks

Dizzy

Share this post


Link to post
Share on other sites
water

The number you see (0,3...) is the fractional portion of a 24 hour day. 0,5 is 12:00:00.

You can calulate this number by calulating the number of seconds of the time value read from the file and divide it by 86400. Then search for this number in your Excel sheet.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Dizzy

I'll give it a try - thanks

Dizzy

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×