Blackbaud CRM - new Batch - datetime issue when importing.

I created a new Batch type using the SDK. One field is a datetime field.

Sample data: 8/1/2021 14:00

I defined it as follows in the AddDataFormTemplateSpec:

<common:FormField FieldID="EVENTSTARTDATETIME" DataType="Date" Caption="Event Start Date and time" IncludeTimeOnDate="true" />

I created a new batch template using this batch type. Then created a new import.

When I try to import, I received the following error: (not a valid date)

452aee6fb82ce8de815d73f2639ad382-huge-er

Where else do I defined the value should accept a time after the date?

The source for the import is downloaded from a third party.

The import works if I remove the time, but I need the date and time to be saved as is.

Thanks.

Comments

  • When you are setting up your import process on the front end you may need to tweak your date format options. For your example it should probably be M/d/yyyy HH:mm

    fb75bd5c6d9a6992ad94de3d98cd376b-origina
  • John,

    I only see m/d/yyyy without the Time - “HH:mm”

    How is the field defined in your tablespec for the field that has the date and time?

    Also how is FormFields defined in your AddDataFormTemplateSpec ?

    Thanks.

  • Kathy,

    You should be able to type whatever you want into that date format field, at least that's what we've done.

    Our fields are defined very similarly.

    Add form- <FormField FieldID="STARTDATE" Caption="Start date" DataType="Date" IncludeTimeOnDate="true" />

    Table spec - <DateField Name="STARTDATE" Description="Start date" Required="false" />

  • Any solution to this. I have the table configured using a DateField with IncludeTime="true" My add, edit, add commit specs in my batch all have a form field with DataType="Date" IncludeTimeOnDate="true" . My Date format is configured in the Import as per the screen shot in the previous post M/d/yyyy HH:mm

    It only seems to accept input during import as valid when the hour has two digits 8/14/2022 1:02:00 is accepted, but 1/3/2023 4:35:00 is not.

    I also have a file where AM or PM is included in the field. I realize this is not included in my date mask in the GUI M/d/yyyy HH:mm and I can't figure out how to add that there.