Jump to content

Excel and time problems


Dizzy
 Share

Recommended Posts

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

Link to comment
Share on other sites

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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...