# ServiceNow opened\_at to Azure DevOps Start Date

**URL:** <https://community.exalate.com/t/servicenow-opened-at-to-azure-devops-start-date/5400>\
**Category:** General Questions\
**Tags:** servicenow, azure, devops, migrated\_question\
**Created:** [November 4, 2024, 8:02am UTC](https://community.exalate.com/t/servicenow-opened-at-to-azure-devops-start-date/5400 "2024-11-04T08:02:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)\
**Post date:** [November 4, 2024, 8:02am UTC](https://community.exalate.com/t/servicenow-opened-at-to-azure-devops-start-date/5400/1 "2024-11-04T08:02:23Z")

</div>

_Originally asked by Robbert Ijsselsteijn on 18 January 2023 [(original question)](https://oldcommunity.exalate.com/questions/58498741)_

* * *

Hi Exalate community,

Currently I am trying to fetch the opened\_at from ServiceNow and sync it to the start date field of Azure DevOps. This turned out to be more difficult than expected. The opened\_at field is fetched from ServiceNow as a string field, with the pattern …

By replacing the / with - it is formatted in the way Azure DevOps should accept it. When trying to sync Azure DevOps throws the following error:

TF401326: Invalid field status ‘InvalidType’ for field ‘Microsoft.VSTS.Scheduling.StartDate’.

I then set out to parse it to a date via below code:

def dateConverter(replicaForConvert) {

def datePattern = “dd-MM-yyyy hh:mm:ss”

```
  def dateString \= replicaForConvert

  if (dateString) {

      dateString \= dateString.replaceAll("/","\-");

      DateFormat formatter \= new SimpleDateFormat(datePattern);

      date \= formatter.parse(dateString);

      Timestamp timestamp \= new Timestamp(date.getTime());

      return timestamp;

```

This gives me the following example:

2023-01-16 14:31:06.0

It adds milliseconds at the end and Azure DevOps does not like this, it won’t accept this as a valid input. It doesn’t give the same error anymore because it is recognized as a date field but it just doesn’t fill the field without an error.

How do i get rid of the millisecond at the end whilst keeping this as a date type and not transforming it to a string?

Thanks in advance for the help.

Cheers,

Robbert

* * *

---

<div class="post-metadata">

**Author:** ![Javier](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/javier/32/338_2.png) [@Javier](https://community.exalate.com/u/Javier)\
**Post date:** [May 22, 2025, 10:58pm UTC](https://community.exalate.com/t/servicenow-opened-at-to-azure-devops-start-date/5400/2 "2025-05-22T22:58:14Z")

</div>


