Using Line Item Dates in HubSpot

11 minute read · Written by admin · Last updated 23 Jun 2025

Using date properties can be a really important way of tracking the data on your line items - whether you're filling out billing dates for invoicing, contract start dates or renewal dates. LinePilot has powerful functionality allowing you to use dynamic date tokens, modify and format dates.

Note: This functionality is currently available to users using Line Item Calculations - read more about Upgrading Templates to use Line Item Calculations

About line item properties

HubSpot line items can have multiple date properties, but comes with some defaults. Each line item property behaves just like any other property in HubSpot, such as a Deal or Contact property, and you can use them in workflows and in reporting. 

Image
Billing Start Date Example

The most common use cases are:

  • Billing Start Date (built in) - used to show customers when payments are made, can be picked up by invoicing tools such as Invoice Stack
  • Contract Start Date - manage when contracts start and finish in cases where that's different to when an item is actually billed
  • Renewal Date - spot when items are up for renewal or when contracts end
  • Event Date, Service Date or Appointment Date - to track when a billable activity takes place

You can add line item properties just like you would for a deal or contact from the properties settings - but note line item properties are listed as "Product" in the editor. Find out more about the difference between products and line items on the HubSpot Knowledge Base.

To make these properties visible in your quote or line items editor - you can edit the columns that show in HubSpot.

Populate dates using LinePilot's built-in dynamic date tokens

LinePilot has dynamic date tokens built in to allow you to quickly populate a line item property, based on the date the template runs - just use the Insert menu to do this. 

Image
Insert Menu Screenshot

At present we offer the following options:

  • today - the date the template runs
  • startOfMonth - the first day of the month the template runs
  • endOfMonth - the last day of the month the template runs

Need a different date? We're adding more options so would love to hear your feedback - alternatively - look at the options below.

Populate dates using deal properties

If you'd like to use a date from elsewhere (for example one that's stored on the Deal) - you can use the Insert menu to choose Deal property and specify a property from your HubSpot deal.

This works really well if you've already calculated the date you need, for example through a workflow. For example, you may want to set the billing start date to be the same as the deal close date. 

Note that if you're populating a property from something that's not a date property itself (e.g. populating from a text field) - then you need to be careful about setting the right format (this is a standard known as the ISO date format)

  • For date properties: YYYY-MM-DD
  • For date time properties: YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss

If your date isn't in this format - then you can use the format date function - see further down the page for more info.

Calculate date properties in HubSpot

Let's say you wanted to create custom dates, e.g. set the billing start date to be 30 days after a course begins. LinePilot's functions allow you to do date calculations really easily. You can find more information about using Line Item Calculations in this article.

See below for a list of the date-specific functions:

FunctionDefinition and Example
format_date(date, format)Format a date using date tokens - see below for available tokensformat_date(Today,"mmm yy")
add_days(date,daysToAdd)
add_months(date,monthsToAdd)
add_years(date,yearsToAdd)
Adds days/months/years to a supplied date. Negative values are accepted as well
add_months(Contract Start Date,Term in Months)
days_between(date1,date2)Get the difference in days between 2 dates
days_between(Close Date,Contract Start Date)

Formatting Dates

See below for a full list of date tokens that can be used with the format_date function.

For example - say you wanted the line item description to be the close date as August 25:format_date(Close Date,"LLLL yy")

Standalone tokenFormat tokenDescriptionExample
S millisecond, no padding54
SSS millisecond, padded to 3054
u fractional seconds, functionally identical to SSS054
uu fractional seconds, between 0 and 99, padded to 205
uuu fractional seconds, between 0 and 90
s second, no padding4
ss second, padded to 2 padding04
m minute, no padding7
mm minute, padded to 207
h hour in 12-hour time, no padding1
hh hour in 12-hour time, padded to 201
H hour in 24-hour time, no padding9
HH hour in 24-hour time, padded to 213
Z narrow offset+5
ZZ short offset+05:00
ZZZ techie offset+0500
ZZZZ abbreviated named offsetEST
ZZZZZ unabbreviated named offsetEastern Standard Time
z IANA zoneAmerica/New_York
a meridiemAM
d day of the month, no padding6
dd day of the month, padded to 206
cEday of the week, as number from 1-7 (Monday is 1, Sunday is 7)3
cccEEEday of the week, as an abbreviate localized stringWed
ccccEEEEday of the week, as an unabbreviated localized stringWednesday
cccccEEEEEday of the week, as a single localized letterW
LMmonth as an unpadded number8
LLMMmonth as a padded number08
LLLMMMmonth as an abbreviated localized stringAug
LLLLMMMMmonth as an unabbreviated localized stringAugust
LLLLLMMMMMmonth as a single localized letterA
y year, unpadded2014
yy two-digit year14
yyyy four- to six- digit year, pads to 42014
G abbreviated localized eraAD
GG unabbreviated localized eraAnno Domini
GGGGG one-letter localized eraA
kk ISO week year, unpadded14
kkkk ISO week year, padded to 42014
W ISO week number, unpadded32
WW ISO week number, padded to 232
ii Local week year, unpadded14
iiii Local week year, padded to 42014
n Local week number, unpadded32
nn Local week number, padded to 232
o ordinal (day of year), unpadded218
ooo ordinal (day of year), padded to 3218
q quarter, no padding3
qq quarter, padded to 203
D localized numeric date9/4/2017
DD localized date with abbreviated monthAug 6, 2014
DDD localized date with full monthAugust 6, 2014
DDDD localized date with full month and weekdayWednesday, August 6, 2014
t localized time9:07 AM
tt localized time with seconds1:07:04 PM
ttt localized time with seconds and abbreviated offset1:07:04 PM EDT
tttt localized time with seconds and full offset1:07:04 PM Eastern Daylight Time
T localized 24-hour time13:07
TT localized 24-hour time with seconds13:07:04
TTT localized 24-hour time with seconds and abbreviated offset13:07:04 EDT
TTTT localized 24-hour time with seconds and full offset13:07:04 Eastern Daylight Time
f short localized date and time8/6/2014, 1:07 PM
ff less short localized date and timeAug 6, 2014, 1:07 PM
fff verbose localized date and timeAugust 6, 2014, 1:07 PM EDT
ffff extra verbose localized date and timeWednesday, August 6, 2014, 1:07 PM Eastern Daylight Time
F short localized date and time with seconds8/6/2014, 1:07:04 PM
FF less short localized date and time with secondsAug 6, 2014, 1:07:04 PM
FFF verbose localized date and time with secondsAugust 6, 2014, 1:07:04 PM EDT
FFFF extra verbose localized date and time with secondsWednesday, August 6, 2014, 1:07:04 PM Eastern Daylight Time
X unix timestamp in seconds1407287224
x unix timestamp in milliseconds1407287224054

Need Assistance?

Our team are happy to help if you need help working out how best to use dates in LinePilot - just reach out to us at support@linepilot.co