Home / Resources / Resolve money and date ambiguity before importing a CSV

Format contracts, independent of country · Practical restaurant resource

Resolve money and date ambiguity before importing a CSV

A valid parse proves compatibility with a declared syntax, not source intent. Keep raw strings, compare interpretations and obtain the source convention before accepting a complete total.

Browser-local strict comparison of two explicit syntax profiles, two fractional money digits, dot/comma decimal, optional opposite three-digit grouping, DMY/MDY slash dates or ISO calendar dates; 2,000 rows and 50 columns.

Original constructed learning cases, prepared with software and AI assistance. Businesses, amounts and outcomes in the sample records are fictional. Sources support the named methods and scoped facts; they do not validate the sample values as industry benchmarks.

Work with your figures

Local amount and date interpretation comparison

Choose both syntax profiles explicitly, compare raw values, and declare a source profile only when the source convention is known.

UTF-8 CSV; maximum 1 MB, 2,000 data rows and 50 columns. Strict two-decimal precision, optional three-digit grouping, DMY/MDY slash dates or ISO YYYY-MM-DD. Extra amount precision is rejected, never rounded.

Files are read locally in this tab. This tool does not upload your records or connect to a restaurant account. Reloading restores the fictional defaults. Keep sensitive records private.

Keep the source text until its convention is established

A CSV can parse cleanly while its values remain unresolved. 03/04/2026 can be 3 April or March 4. A dot can be a decimal mark or a grouping mark. This diagnostic compares two explicit syntax profiles on your pasted CSV or a file selected locally in this tab. It never infers a source locale from the browser, and private files are not uploaded.

Microsoft documents that Power Query's locale affects text-to-type conversion. Here, profiles are narrower declared format contracts, independent of a country label. You choose decimal, grouping and slash-date order separately, then decide whether source documentation establishes A, B or neither. A syntactically valid interpretation is not evidence that it was intended.

  1. Preserve raw amount, date and identifier strings.
  2. Apply profile A and profile B without changing the source.
  3. Separate rejected values, one-profile values and different valid interpretations.
  4. Obtain the source convention; declare it explicitly and require all rows to pass before accepting a complete total.

Why two successful parses can still disagree

In this constructed example, profile A uses dot decimals, comma groups of three and day/month/year dates. Profile B uses comma decimals, dot groups of three and month/day/year dates. These are invented teaching profiles, not claims that an entire country uses one format.

Constructed interpretation witnesses
Raw valueProfile AProfile BWhat is established
1,234.56123456 minor unitsRejectedCompatible with A amount syntax only
1.234,56Rejected123456 minor unitsCompatible with B amount syntax only
03/04/20262026-04-032026-03-04Two valid dates; intent unresolved
31/02/2026RejectedRejectedNeither calendar is valid
12.345Rejected: extra decimal precision1234500 minor unitsA grouping interpretation is possible, not authorised

The ten-row mixed fixture deliberately contains inconsistent formats and invalid dates. It is not a coherent single-locale export. Under A, four complete rows pass: their amounts are 123456 + 10000 + 0 − 1050 = 132406 minor units. Under B, six complete rows pass: 123456 + 10000 + 0 + 1234500 + 2500 + 123 = 1370579 minor units. A subtotal includes a row only if both its amount and date pass that profile. Neither subtotal is an accepted complete-source total.

Download the constructed ten-row CSV, comparison settings JSON, independent row-answer JSON and fixture README text. Identifiers 001 through 010 remain strings.

Declare the CSV dialect separately from the number syntax

A comma delimiter separates CSV fields; a comma decimal mark belongs inside a field. An amount such as 1,234.56 therefore needs CSV quotes when the delimiter is comma. Choose the actual delimiter before comparing values. This parser accepts comma, semicolon or tab, with structural quoted-field handling rather than splitting lines. The informational RFC 4180 describes common CSV quoting conventions; it does not define a currency, date order or restaurant schema.

Both profiles accept ungrouped whole numbers and a decimal fraction of one or two digits. With dot decimal, optional three-digit grouping uses commas; with comma decimal, it uses dots. Grouping requires one to three initial digits followed by complete groups of three. Choose “No grouping” when the source forbids it. Group marks cannot appear in the fraction. Zero is a value; blank is missing.

The model converts the valid amount string to an exact signed integer at scale 100: -10.50 becomes −1050 and 0 becomes 0. It never uses a partial numeric prefix. Thus 12 USD, ₹12, 1e3, +12, accounting parentheses and surrounding whitespace are rejected, even if a spreadsheet might accept some of them. More than two fractional digits are rejected rather than rounded. Individual amounts beyond safe integer precision are rejected as field errors and prevent an accepted total; an overflowing valid-row subtotal stops the run.

Dates are calendar checks, not display guesses

Slash dates must use the chosen DMY or MDY order and a four-digit year; one- or two-digit day/month components are supported. The ISO shape YYYY-MM-DD is checked under both profiles. Years run from 0001 to 9999. Month lengths and the Gregorian leap-year rule are explicit: divisible by 4, except centuries not divisible by 400. Accordingly, 2024-02-29 is valid, 2025-02-29 is invalid, and 1900-02-29 is invalid.

This tool does not accept timestamps, time zones, spreadsheet serial dates, month names or two-digit years. ISO formatting removes day/month order ambiguity within this scope; it does not establish a restaurant's reporting day, time zone or historical calendar policy. Period grouping is a downstream step after interpretation has been established.

Use the separate amount and date comparisons

Every row retains raw amount and date text, each profile's interpreted minor units and ISO date, and rejection messages. A field may be valid under both profiles while the other field rejects the row. The complete-row status therefore answers a stricter question than either field alone. “Invalid under both” means neither profile accepts the complete row; inspect the field comparisons to learn why.

The mixed sample's 100 with 03/04/2026 is the one complete row with two different valid interpretations: its amount agrees at 10000 minor units while its date differs. The 1,234.56 row also has two valid date interpretations, but the complete row is “A only” because its amount fails B. This distinction prevents a row-level count from hiding date ambiguity.

Move from compatibility to an accepted source total

Leave the source convention set to unresolved while investigating. The A/B valid-row subtotals are hypotheses for diagnosis. The accepted complete total remains N/A. A row valid under only one profile can still be a typo, a different unit or evidence of a mixed export; the tool does not choose that profile automatically.

Ask the producer for a dated export specification or a confirmed source example that distinguishes the formats. Confirm the currency/unit and its scale, the grouping rule and the date order independently. Do not select A or B simply because it validates more rows. If the source deliberately mixes conventions, split it using an authoritative field or obtain a corrected export; this tool does not assign different profiles row by row.

Once source evidence establishes a profile, declare it in the form. A complete accepted total appears only if every source row has both a valid amount and date under that profile. If even one fails, the complete total is withheld and the profile's valid-row subtotal remains visibly partial. Repairing an input is a separate documented action; raw values are never overwritten with the interpretation.

The clean constructed A sample contains 1234.56 on 13/04/2026, −10.50 on 2026-11-27 and 0 on 2024-02-29. With source A explicitly declared, all three rows pass and the complete total is 123456 − 1050 + 0 = 122406 minor units. Download its CSV input and declared settings JSON. This teaching fixture demonstrates the acceptance rule; it does not validate a real source convention.

Keep a reproducible import decision

The page's JSON download contains current inputs, declared profiles and results. Parsed source cell strings remain in row witnesses; the original pasted CSV text remains in inputs. This is value preservation, not a byte-for-byte original-file archive. CSV quoting or a leading UTF-8 BOM can be normalised by structural parsing. Identifiers are never passed through numeric or date conversion.

The supported population is at most 1 MB, 2,000 data rows and 50 columns of UTF-8 CSV, with unique nonblank headers and consistent row widths. All totals use the full supported input, even when the interface limits visible witness rows. The diagnostic supports one amount and one date column per run, one declared two-decimal unit, and two explicit profiles. It does not infer exchange rates or a currency's permitted fraction scale; do not use it to silently rescale three-decimal money.

There is no cleaned CSV or XLSX export. Keep the current JSON as a decision record, then apply the confirmed schema in the actual import system and reconcile counts and control totals. Use CSV preflight for structural problems, schema migration rehearsal for declared unit transformations, and export data cleaning for the wider preservation workflow.

Sources, method and boundaries

Check any local rule, contract and source definition before applying this method. These exercises are not a professional legal, tax, food-safety or accounting determination. Read our editorial process or report a factual or calculation problem.

Continue with the right evidence