BlogIntegrations · November 16, 2026 · 4 min read

Contact Form 7 to Google Sheets: Read Date Serials and Text Correctly

Read both formatted and unformatted Google Sheets values and keep Contact Form 7 calendar dates, local times, and timestamps distinct.

A Contact Form 7 booking request lands in Google Sheets as a date. The sheet shows a readable calendar day, but your report connector reads a number. Another row shows the same-looking date and returns a string. Before changing the spreadsheet formatting, find out what the API actually returned and what the field means. A requested day, an appointment time, and the instant a lead arrived require different handling.

A green spreadsheet grid highlights a cell with a chart symbol and a calendar.
Generated conceptual illustration.

Decide what kind of date you mean

A date-only field is a calendar day without a clock or an offset. An example is the day a customer requests a site visit. If your export contract treats it as date-only text, accept a known format such as 2026-11-16, validate that it is a real calendar date, and preserve it as text across the integration. If you use true sheet date cells instead, declare their type in your mapping and convert them under an explicit policy.

A local date and time describes a clock reading at a place. For appointments, store the intended region time zone separately and handle daylight saving gaps and duplicate local times intentionally. A timestamp describes an instant, for example when a connector received a lead. Store it in an unambiguous representation with an explicit offset or in UTC. It can be formatted for a local report afterward. Do not infer the time zone from a decimal serial. See the appointment time guide and the reporting time zone guide for those separate policies.

Read both views of the same cells

Call spreadsheets.values.get against a small, known range in a test sheet. Use valueRenderOption=FORMATTED_VALUE in the first read and valueRenderOption=UNFORMATTED_VALUE&dateTimeRenderOption=SERIAL_NUMBER in the second. The formatted read reflects a cell’s display format and locale. The second request returns an actual date cell as a serial number, while a cell storing plain text can still return a string. The date-time render option is ignored when formatted value is requested.

For a deterministic fixture, enter a genuine sheet date of November 16, 2026 and explicitly apply a year-month-day format. A serial read of that date is 46342. A genuine date-time cell at noon on that day has a fractional portion of 0.5, yielding 46342.5. A text cell written with the string 2026-11-16 using RAW can display the same date while remaining text. Treat those displays as clues, then inspect the response types. The serial epoch is December 30, 1899. A serial does not store an offset or tell you whether its number came from a date, a duration, or an ordinary numeric cell.

Normalize one intake column at a time

  1. Lock the column mapping. Confirm the range and header before reading values. See how to prevent misaligned Sheet columns. A date parser cannot fix a read that targets the wrong column.
  2. Record spreadsheet settings. Get the spreadsheet locale and time zone from its properties. Write them in the integration notes, including the zone used for reporting. Keep these settings with a sample API response so a later locale change doesn’t silently alter a display-based parser.
  3. Preserve the type at intake. Compare the report importer with the actual connector write behavior. A raw string is useful for canonical date-only text. A numeric serial with a date format is useful for spreadsheet date arithmetic. Require exact ISO date text in the first contract. In the second, interpret a numeric value as a date only when it arrives in the declared date column, and reject date-only cells that have an unexpected fractional part instead of quietly dropping a time.
  4. Keep blanks visible. The values API omits empty trailing rows and columns. Treat missing and blank values according to the supported row layout; never silently replace an absent date with today or the epoch. Preserve the row identifier and surface unexpected values in an exception count.
  5. Compare output. Check that the report sorts the canonical date correctly and that late-night sample events land in the expected reporting day. If the reader has to accept mixed data during a migration, keep each accepted format explicit and record which branch was used.

Use a small regression fixture

Test a true date cell and an ISO text cell showing the same date, a true date-time at noon, a blank trailing value, and a text value such as 11/12/2026 with no declared parsing rule. In a date-only text contract, only the exact valid ISO string is accepted. In a declared date-serial contract, the date cell is accepted, the date-time with an unexpected fraction needs review, and the ambiguous text is rejected. Keep a separate timestamp example with an explicit offset if your report imports instants too.

Re-read the fixture under a different display format in a test copy. The date serial or canonical raw string should retain its meaning. A chart that passes only because today’s date format happens to match the parser needs a more explicit contract.

Next step

Save the two API responses for a synthetic range and choose one accepted representation per column. Keep intake reconciliation separate from form activity reporting; Svetlik Analytics for Contact Form 7 is a WordPress option for the latter.

Official references