# Splitting Serial Number into Date Field

**URL:** <https://community.hubspot.com/t/splitting-serial-number-into-date-field/105059>\
**Category:** CMS Development\
**Tags:** looking-for-feedback, local-development, css\
**Created:** [April 17, 2024, 5:21pm UTC](https://community.hubspot.com/t/splitting-serial-number-into-date-field/105059 "2024-04-17T17:21:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JDonskey9](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@JDonskey9](https://community.hubspot.com/u/JDonskey9)\
**Post date:** [April 17, 2024, 5:21pm UTC](https://community.hubspot.com/t/splitting-serial-number-into-date-field/105059/1 "2024-04-17T17:21:46Z")

</div>

Hi Community - Was looking for help taking a field that stores Serial Number and splitting it out before the dash so that it could be reformatted into a date field and copied into a different property.

i.e. If the serial number was 20110406-A0287103, then the manufacture date would split out the first section before the dash and copy that info into a date property on the Date of Manufacture field to be April 6th, 2011.

It looks like I may be able to use the formatting workflow functionality to get the numbers into a data format once they are split to only keep the data before the dash.

Any help wolud be greatly appreciated! Thank you!

---

<div class="post-metadata">

**Author:** ![SteveHTM](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stevehtm/32/22074_2.png) [@SteveHTM](https://community.hubspot.com/u/SteveHTM)\
**Post date:** [April 17, 2024, 5:30pm UTC](https://community.hubspot.com/t/splitting-serial-number-into-date-field/105059/2 "2024-04-17T17:30:47Z")

</div>

@JDonskey9 - it may be possible to use a regex flavour of the custom formatting functionality, but I personally would just dive into a custom code step to do both the splitting and the conversion ijnto a date string. You will likely find a more robust mechanism for teh logic by going this route.

Hope that’s helpful.

Steve
