Default Timestamp Automatically Gets Added To The Date Field

1033
3
02-26-2021 08:44 AM
Ctal_GISsquad
New Contributor III

I am using 'Watch folder for csv' input connector to read .txt files that have several data & time fields. These fields are being written in a feature service housed in Spatio-Temporal Data Store. The issue is, for those 'Date' fields that have only date value in them, a default timestamp gets added by Geoevent. So, if the csv has '01/25/2010' as the value, this is being written in my feature service as '01/25/2010 4 PM'. I tried adding MM-DD-YYYY as Expected Date Format, but that didn't help either. I would really appreciate if I could get any help on removing the default '4 PM' timestamp from my date field. 

Thanks,

Shital

0 Kudos
3 Replies
RJSunderman
Esri Regular Contributor

@Ctal_GISsquad - Please see my reply to your question in the thread Converting between Date Formats 

Clicking here should take you directly to my reply in the thread.

Ctal_GISsquad
New Contributor III

Hi @RJSunderman , thank you so much for the reply. However, I think I am still in need of some assistance here. Allow me to explain my issue further.

My CSVs have multiple date and time fields. Some of them have Epoch Values which I was able to convert to desired MM/DD/YYYY MM:HH format, thanks to your earlier post.

However, I also have some fields with 'Date' data type (not string) that have date values in them. Since my end users/client application require fields that have 'date' values only, I am trying to retain the original date only format.

In the following screenshot, W is a 'date' field, X is a 'time' field and Y is a 'date' field with epoch values (the CSV was exported from SQL Server). I was able to convert X and Y respectively as 'string' and 'date' field (in geoevent definition). However, I want to import W column as date in feature service (with no time values). Is it possible in Geoevent/Portal? Or does Geoevent/feature service cannot handle date only fields? 

Ctal_GISsquad_0-1614573990915.png

P.S - Following is a screenshot of a feature layer created using above CSV (different records, values do not correspond to CSV above). As you can see, 'call_created_date' field has unwanted and default 5 pm values appended to it. 

Ctal_GISsquad_1-1614574432328.png

 

Thanks again for your time,

Shital

0 Kudos
EricIronside
Esri Regular Contributor

hey @Ctal_GISsquad 

The default time that geoevent creates is going to be UTC.  So if your server's time is not set to UTC, the date will be offset according to the timezone you are in.  To get around you can add/subtract your timezone offset from the date value. But that only returns the time assigned to the date back to midnight (or noon) and doesn't really get rid of it.  To not display the time, you will need to rely on the web map to format the date field without a time.  Alternatively, you could add the time you have from the call_created_time field (call_created_date - timeZoneOffset + call_created_time). This would result in a date in call_created_date field that had the proper date and time. That assumes the call_created_time is a local time (if it is in UTC you can omit the timeZoneOffset).

0 Kudos