Solved

add and subtract values in xml string

Posted on 2015-02-09
8
110 Views
Last Modified: 2015-02-11
Hey guys
A little programming question.  I have a fingerprint time clock that outputs to a xml file that is formatted for spreadsheets.  Problem is this.  If a person clocks in first thing in the morning and clocks out for lunch and then back in and back out at the end of the day, the Time clock puts all the time values inside one cell, or string (if you open it with Notepad).  Is there a way to take this data and calculate a total time at work for that one day?  Or am I stuck with manually calculating it up.
0
Comment
Question by:jonmenefee
  • 5
  • 3
8 Comments
 
LVL 18

Accepted Solution

by:
Simon earned 500 total points
ID: 40599597
What does the string look like in notepad?

Is it like "09:00 12:01 13:01 17:15"

Does it store the date in a separate cell?

Are there incomplete records such as
"13:00 18:01 19:04"
where someone logged in but forgot to log out at the end of their shift or worked through until after midnight?

Can you post a sample of the Excel file? It should be possible to split the values, but need to see the data we're dealing with.
0
 

Author Comment

by:jonmenefee
ID: 40599641
Here it is.  Thanks for the help so far :-)
0
 

Author Comment

by:jonmenefee
ID: 40599643
oops :-)
0
 

Author Comment

by:jonmenefee
ID: 40599647
dang, it wont let me upload.  I will try again.
January-2015-hours.xml
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 18

Expert Comment

by:Simon
ID: 40600858
Hi, it is possible to split those values to get the individual time elements, but the sample has an odd mixture of duplicated entries and unpaired values. Is this because the system is not yet live?
TimesheetXML.pngI have to query this to establish how you want to deal with the following cases:
1. Unpaired values (perhaps login but not logout or vice versa). Should this produce a zero result?
2. Odd numbers of entries (as on 9th), which also imply an unpaired login or logout
3. Multiple instances of the same time value (as on 9th) - should all but the first instance be disregarded?
0
 

Author Comment

by:jonmenefee
ID: 40604479
how you are seeing it is how it shows up on the big report.  Turns out there is a summary report that I didn't know about.  It summarized everyones time into a grand total of hours for each person.  So, I don't need to do any programming..   thank god :-)
0
 

Author Closing Comment

by:jonmenefee
ID: 40604483
His questions prompted me to dig deeper into the system and I found what I was looking for.  Therefore points should go to him :-0
0
 
LVL 18

Expert Comment

by:Simon
ID: 40604488
LOL - glad for you :)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Excel Data Validation Question. 13 50
COLOR A CELLL IF 6 35
icloud.com Numbers spreadsheet question DATEIF 8 118
kendo spreadsheet 2 218
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
: Microsoft Office Collaborate for free and online versions of Microsoft  Word, Excel, Powerpoint, OneNote, Onedrive , Email, Calendar etc. In short we can say that Microsoft office is a suite of servers, applications and services developed by  Micr…
Video by: Zack
Viewers will learn about using Excel in a browser with Excel Online.
Viewers will learn the basics of printing in Excel 2013 and how to adjust some common settings.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now