Skip to content

Billing Data CSV Export: How to Parse Your History

Learn how to parse raw time and billing exports, convert cents and seconds, handle negative lines, and join relational tables.

8 min read
A wooden desk with a computer monitor displaying spreadsheet tables alongside paper ledger reports.
Photo by Anna Pou on Pexels.

To read a billing data CSV export correctly, map raw integer values to their canonical types: divide time logged in seconds by 3,600 to get decimal hours, divide monetary amounts stored in cents by 100, and join relational tables using unique record IDs rather than matching text strings. Credit adjustments and refunds appear as negative integer values in the amount column, while foreign keys link individual entry rows directly to their parent project, client, or invoice records.

Why software systems export billing data CSV files with raw integers

When you export your operational history from a time tracking or invoicing system, the output rarely looks like the clean summaries displayed in the user interface. Opening a raw data file in a spreadsheet editor often reveals unexpected figures: five-figure integer amounts without currency symbols, single time logs stored as large numbers, and cryptic alphanumeric identifiers across every column. Software engineers design database engines this way intentionally to maintain absolute mathematical precision.

In standard computer architecture, floating-point arithmetic cannot represent base-10 fractional numbers like 0.1 or 0.2 with exact precision in binary format. When software platforms perform financial calculations using floating-point numbers across thousands of line items, microscopic binary rounding errors accumulate. Over a fiscal year, these fractions compound into dollar-level discrepancies between your invoice subtotal and your general ledger. To prevent this, professional engineering teams build financial software to store monetary balances as exact integer counts of the smallest currency unit, usually individual cents. A balance of $1,250.00 is stored in the underlying database table as the integer 125000.

The same logic applies to time tracking records. Storing billable work as decimal hours (such as 1.3333 hours for an 80-minute task) introduces precision loss the moment the duration is saved. Systems store durations as positive integers representing total elapsed seconds. A task lasting 2 hours, 15 minutes, and 30 seconds is recorded cleanly as 8130 seconds. Understanding these storage standards allows you to build custom reporting scripts or clean historical datasets during a platform migration without corrupting your billable totals.

Parsing currency, duration, and tax fields in your export

Converting raw export data into standard financial reports requires applying specific mathematical operations to each column based on its data classification. Before writing spreadsheet formulas or database import scripts, review the primary header row of your CSV file to identify the precise unit recorded in each column.

Converting monetary and duration integers

To convert raw values into usable numbers for accounting software or custom studio dashboards, apply fixed conversion factors across each column type:

  • Monetary fields (cents to base units): Divide integer amounts by 100. A row with 45000 in an amount_cents column equals exactly $450.00. If your system handles micro-transactions or token usage, values may be stored in micro-cents (millionths of a dollar), requiring division by 100,000,000.
  • Duration fields (seconds to decimal hours): Divide integer durations by 3,600 to derive decimal hours. A row showing 12600 seconds equals 3.50 hours. To evaluate time in minutes for short agency tasks, divide by 60.
  • Tax and discount rates (basis points): Percentage rates are frequently recorded in basis points, where 100 basis points equal 1 percentage point. An explicit tax column storing 2000 represents a 20.00% tax rate, calculated by dividing the integer by 10,000.
  • Timestamps (Unix epoch vs ISO-8601): Timestamps usually appear either as an ISO-8601 text string (such as 2026-03-15T14:30:00Z) or as a 10-digit Unix epoch integer representing total seconds elapsed since January 1, 1970. Unix timestamps allow precise programmatic sorting regardless of local time zone offsets.
Standard field conversions for raw billing data CSV exports
Field NameRaw Database ValueParsed Accounting ValueConversion Formula
duration_seconds126003.50 hoursvalue / 3600
amount_cents45000$450.00value / 100
credit_amount_cents-5000-$50.00value / 100
tax_rate_bps200020.00%value / 10000
created_at_epoch17735850002026-03-15 14:30:00 UTCStandard Epoch Conversion

Establishing explicit conversion formulas in your data pipeline guarantees that historical records match your published bank deposits and historical tax filings exactly.

Joining relational tables in a billing data CSV export

A complete database backup or comprehensive export does not pack every piece of agency information into a single, massive spreadsheet. Denormalizing data into a single table creates massive reduncancy, repeating client physical addresses, project names, and payment terms across thousands of individual time logs. Instead, exports isolate entities into discrete relational tables.

Linking primary keys to foreign keys

When you extract a full dump of your operational history, you will typically download separate CSV files for clients, projects, invoices, line items, and time entries. Reconstructing your business history requires joining these files using exact system identifiers:

  • client_id: The primary key in the clients table, referenced as a foreign key across project records and invoice headers.
  • project_id: The primary key in the projects table, referenced in individual time entry rows and milestone tracking tables.
  • invoice_id: The primary key in the invoices table, referenced on each individual line item row in the line items table.
  • user_id or agent_id: The primary key identifying the human team member or automated AI agent that performed the billable work.

Never attempt to link relational tables using plain text strings like client names or project titles. Company names change over time, agency staff introduce spacing typos, and different clients frequently select identical project titles like "Website Redesign" or "Retainer Support". If you filter time logs using text matching rather than joining unique relational keys, your script will combine unrelated project budgets or drop historical entries entirely.

We detail our explicit export structure, schema keys, and flat-file formats on our data ownership and export page, ensuring studio operators retain uncorrupted access to their historical ledgers.

Handling negative numbers, adjustments, and payment gateway metadata

Financial ledgers record transactions bidirectionally. Billable work and issued invoices increase outstanding accounts receivable, while credit adjustments, advance deposits, and payment processing write-offs reduce it. In a CSV export, these balancing movements appear as signed negative integer values in monetary columns.

Distinguishing credit notes from payment collections

A line item storing an amount of -15000 cents (-$150.00) represents three fundamentally different business events depending on its accompanying metadata:

  • Line-item discounts: Applied directly to an active invoice before finalizing the total balance due. The discount reduces gross invoice revenue without creating a separate credit balance on the client's account ledger.
  • Credit notes and bad debt write-offs: Issued against an open invoice to forgive an unpaid balance or resolve a client dispute. This reduces accounts receivable without representing incoming cash flow.
  • Cash refunds: Capital returned directly to a client through an active payment processor, reversing a prior cash collection.

Always inspect structural status flags such as entry_type, transaction_kind, or is_credit in your export files. Summing negative values directly into cash collection tallies without filtering by transaction type will misstate physical bank deposits while obscuring write-offs.

Factoring payment gateway processing fees

When reviewing invoice settlement data originating from payment networks like Stripe, compare gross transaction values against merchant processing fees. Database tables usually expose two distinct fee fields: amount_collected_cents and gateway_fee_cents. A client paying a $1,000.00 invoice yields 100000 in collected funds, but the gateway may deduct 2930 cents ($29.30) in processing fees. The net deposit entering your studio bank account equals 97070 cents ($970.70). Tracking net cash receipts requires accounting for processor fees separately rather than reducing the historical invoice total itself.

Modern agency workflows increasingly involve automated software execution alongside human engineering hours. When logging automated machine tasks, work is recorded in token counts or API call units rather than human wall-clock time. Parsing these unit costs requires matching execution logs against a live pricing catalog. Software platforms manage this by referencing updated market indexes. Our platform prices AI execution metrics against a reference catalog of 2,526 models across 84 providers, refreshed daily from MyTokenTracker under CC BY 4.0. To review how automated execution units translate into standard billable line items, read our guide on billing for work done by AI agents.

Reconciling time entries against invoice summaries: A step-by-step process

Before importing an exported billing history into a new studio management platform or data warehouse, perform a structured verification audit across your raw CSV files to confirm data integrity.

Step 1: Reconcile overall time log durations

Open your time entries CSV export in a database runner or script environment. Sum the duration_seconds column across every row in the file. Divide the grand total by 3,600 to calculate the complete decimal hour footprint. Compare this single figure against the aggregated lifetime hours reported in your prior platform's administrative dashboard. An exact match confirms that the file extraction completed fully without dropping historical records.

Step 2: Audit historical rate inheritance

Check whether individual time entry rows contain an explicit hourly_rate_cents snapshot column, or if the system relied on dynamic inheritance from a parent project or user profile. Dynamic inheritance means the rate was stored only on the user or project table. If rate values are missing from individual time entry rows in your export file, calculating unbilled dollar values requires running a SQL join back to the project or user table to pull the rate active on the entry date. Snapshot architectures avoid this risk by writing the exact billable rate directly to the time entry row at the moment the timer stops.

Step 3: Validate tax subtotal rounding

Examine invoice rows that include local sales tax or VAT. Verify whether tax was computed on individual line items and then summed, or calculated once against the complete invoice subtotal. Line-item tax calculations rounded to the nearest cent can produce a single-cent total variation compared to calculating tax on an aggregated subtotal. Identifying which method your prior platform used ensures your target software mirrors your historical tax reporting without generating artificial penny discrepancies.

Honest limitations of flat file CSV exports

Although CSV files are widely supported, portable, and easily processed by modern scripting languages, relying strictly on flat files for operational historical storage presents clear structural limitations that studio managers must account for.

Absence of schema enforcement and constraints

CSV files store plain text. They possess no built-in mechanism to enforce data types, validate required fields, or maintain foreign key relationships. If an exported CSV file is opened and edited inside desktop spreadsheet software, the program may automatically reformat numbers, remove leading zeroes from numeric client codes, or convert standard ISO-8601 date strings into localized text formats (such as converting 2026-03-05 to 3/5/26). Saving the file after spreadsheet auto-formatting corrupts raw dates and numerical keys, causing automated database import scripts to fail.

Performance bottlenecks on large operational archives

As a studio operates over multiple years, historical exports accumulate hundreds of thousands of individual records across time logs, task updates, and invoice line items. Executing complex relational joins across multi-gigabyte flat files inside desktop applications consumes significant RAM and often leads to system crashes. When auditing large historical datasets, bypass desktop spreadsheet editors entirely. Import your raw flat files directly into an isolated relational database like SQLite, or write simple Python parsing scripts using streaming file readers to process historical records efficiently without risking silent data truncation.

Time tracking and invoicing with a bill that does not move

Nothing is metered on any plan, including Free. Import your Harvest history, keep unlimited projects, clients and invoices, and take your data out again whenever you like.

Questions people ask about this

Why are monetary amounts in my billing CSV export displayed as large integers without decimals?

Software applications store money as integer counts of the smallest currency unit, such as cents, to prevent floating-point binary rounding errors. To convert an integer amount like 45000 into standard dollars, divide the value by 100 to get $450.00.

How do I convert exported duration seconds into decimal hours for client invoicing?

Divide the total duration integer in seconds by 3,600. For example, a duration field containing 12600 seconds divided by 3,600 equals exactly 3.50 decimal billable hours.

Why should I avoid matching clients by name when processing exported billing files?

Client names change over time, contain typos, and are prone to spacing variations. Always join relational export files using immutable unique keys like client_id or project_id to prevent orphan records or inaccurate billable totals.