Dizzy Posted February 24, 2012 Share Posted February 24, 2012 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 More sharing options...
water Posted February 24, 2012 Share Posted February 24, 2012 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 - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Dizzy Posted February 24, 2012 Author Share Posted February 24, 2012 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 More sharing options...
water Posted February 24, 2012 Share Posted February 24, 2012 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 - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Dizzy Posted February 24, 2012 Author Share Posted February 24, 2012 I'll give it a try - thanks Dizzy Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now