Questions in topic: "date" https://knowledge.亚搏在线safe.com/questions/topics/single/38610.html The latest questions for the topic "date" Use date user published parameters in SQLCreator https://knowledge.亚搏在线safe.com/questions/88028/use-date-user-published-parameters-in-sqlcreator.html

Hello,

I am reading my oracle non spatial database with an SQL query containing couple of dates.When inputting the dates directly in the query,there is no problem and it runs smoothly.

I would like to make user parameters from these dates.So I have created published user parameters choosing 'date' as type.

I then try to use the parameter in my SQL query (where clause) but I get a type error over and over.I have tried couple of different notations but it doesn't seem to work...

This works (without parameters)
AUTO_START_DATE <= TO_DATE('15/12/2019','DD/MM/YYYY')

Then I tried several variation to use :
$(START_DATE)

but I can't seem to find the right syntax.

Thank you

oracle sql sqlcreator date user parameter Wed,06 Mar 2019 15:14:21 GMT tsirkuse
Want to convert 3 character month to 2 digit month https://knowledge.亚搏在线safe.com/questions/85005/want-to-convert-3-character-month-to-2-digit-month.html

I am trying to convert a three character month to a two digit month (e.g.- Mar to 03) using FME 2016.1 (build 16492).Should be easy enough using the DateFormatter but the converted value returned is always 01.I think my parameters are set up correctly.Screenshot attached.Any ideas?

Thanks,

Aaron

dateformatter date month Tue,08 Jan 2019 18:30:03 GMT aaron
FeatureReader - Reading in records based on the LAST_UPDATED date field https://knowledge.亚搏在线safe.com/questions/84307/featurereader-reading-in-records-based-on-the-last.html

I am using a FeatureReader to connect to our SDE GDB.I want to add a query (WHERE Clause) to the FeatureReader so that I am only pulling in records within the Feature Class that were edited within the last month (or sometimes edited in the last 5 days).

When I look at the SDE data via MS SQL Server Management Studio (SSMS) vs within FME's Data Inspector I see the data in different formats:

Within SSMS - LAST_UPDATED field is a DATE field:
last_updated (datetime2(7),null)
2018-12-01 16:23:56.0000000

Within Data Inspector - LAST_UPDATED field is STRING field:
last_updated (string)
20181128133118

My questions:

1) is there a way to specify which attributes I want to be brought in?Right now I am using an attribute manager to remove the unwanted attributes.

2) How do I only at a WHERE Clause so that I only pull in the data I want within the specific time range?I have tried"last_updated" > '20180500000000'but this brings in nothing.I am assuming this is because FME is treating the field as a string?If this is true,then...

3) How do I get FME to see this field as a date field while using the FeatureReader?

4) Once I am able to work with this data as a date,how do I do a WHERE Clause so that I only pull data that has been edited within the last 5 days?I will be running this query everyday,so I want the query to be something likelast_updated >= dateadd(DAY,-5,GETDATE())


I am using FME(R) 2018.1.0.2 (20180903 - Build 18547 - WIN64)


Also tried a WHERE Clause of@DateTimeCast("last_updated",datetime) > '20181201000000'but get the following error:
The error number from ArcObjects is: '-2147216072'.The error message from ArcObjects is: {Underlying DBMS error [[Microsoft][SQL Server Native Client 11.0][SQL Server]Incorrect syntax near '>'

attribute handling date Fri,14 Dec 2018 19:35:31 GMT juliarozema
Update AGOL without changing edit date? https://knowledge.亚搏在线safe.com/questions/84210/update-agol-without-changing-edit-date.html

Has anyone got a workaround for updating a hosted feature layer without effecting the edit date?I have had multiple editors updating many hosted layers for over a year.I now need to change some attributes on a large scale (+30k records).


Ive been able to create a simple workbench using the feature merger to achieve my update.The issue now is loosing the historic,editor and edit date attribute.


Many Thanks

Mick


fme arcgis online date editor tracking Thu,13 Dec 2018 14:54:13 GMT mickfulton
Calculate difference in hours between two strings https://knowledge.亚搏在线safe.com/questions/81798/calculate-difference-in-hours-between-two-strings.html

I have two string fields (TimeStartedCTZone,TimeEndedCTZone) formatted as shown below.How can I calculate the difference in Hours despite having strings as inputs instead of datetime data types?

date time date dates Mon,05 Nov 2018 16:28:37 GMT mariofederis
CSV to FGDB table - null date attribute could not be written - containing feature dropped https://knowledge.亚搏在线safe.com/questions/76202/csv-to-fgdb-table-null-date-attribute-could-not-be.html

Hi,

I thought I'd solved this issue with a spreadsheet reader however I appear to be experiencing the same thing with a CSV reader.Whenever a record with a null date field hits the writer it will have the error "attribute could not be written.The containing feature has been dropped." - but I still require that record.With the spreadsheet reader once the spreadsheet date fields were cleaned up so they only had either a date or a null value (the cell contents were cleared in excel) it worked fine.I would've thought that a CSV reader would have less difficulty.

Is there a transformer/parameter out there that remedies this issue?

Any ideas FMEers?

Cheers,

Mike

attribute handling csv date fgdb Sat,11 Aug 2018 00:58:38 GMT mikegresham1
Convert different date formats in same attribute https://knowledge.亚搏在线safe.com/questions/72948/convert-different-date-formats-in-same-attribute.html

I'm reading in data from multiple XML files,all of which have the same date attributes (xml_char in the XML Reader).However the dates are not all the same format - some are 2018-06-22 and some are 22/06/2018.I want to write the dates to date fields in a File Geodatabase.

I can have 2 DateTimeConverters (one for one date format and one for the other) based on whether the date attribute contains - or / and use a Tester or TestFilter to send the features to the appropriate converter.But is there a better way?

I'm wary of using "Auto detect" in the DateTimeConverter - people have previously said it's better to specify a specific Input Format.

dateformatter date datetimeconverter date formatting Fri,22 Jun 2018 17:06:47 GMT tim_wood
Feature Reader putting dates into ATTRIBUTE.full and ATTRIBUTE https://knowledge.亚搏在线safe.com/questions/72838/feature-reader-putting-dates-into-attributefull-an.html

Hey guys,

I have a dynamic feature reader that reads and SDE database,one of the fields is a date time field called UFI_CREATED

When i use a standard SDE reader this works fine on the dynamic writer.But when I use the feature reader,it appears that its sending the full attribute into UFI_CREATED.full and date attribute called UFI_CREATED.When I try and write this I get an error saying that

A feature,of feature type 'PROPERTY',had an invalid time component for its time/datetime attribute 'UFI_CREATED'.

This is because its expecting the .full attribute but dynamically its getting the shortened one.

I could change all the attributes that I think might be affected manually back to non full,but this defeats the purpose.

Why is it mapping it like this?And is there any way I can prevent this from happening.

Regards,

James

sde date dynamic feature reader feature writer Thu,21 Jun 2018 01:03:00 GMT jamesleversha
FME Desktop 2017.1 - Date changes? https://knowledge.亚搏在线safe.com/questions/72665/fme-desktop-20171-date-changes.html

Hi,

Previously when passing attributes names 'today','1 week ago' etc ot the dateformatter it could work out the date.现在这是失败的。

Have I missed something?

Thanks

date Tue,19 Jun 2018 13:32:07 GMT fme_it
DateTimeConverter cant autodetect https://knowledge.亚搏在线safe.com/questions/69290/datetimeconverter-cant-autodetect.html

I have the following datetime format built from python datetime like bellow.

datetime.datetime.today()2018-04-29 12:20:36.975031

Im reading a csv dataset and trying to load it to an elasticsearch writer setting the writer field with the pythondate to a datatype 'date' but it always fail with following error

2018-04-30 16:35:25|   2.0|  0.0|ERROR |ELASTICSEARCH writer: {"took":0,"errors":true,"items":[{"index":{"_index":"imob","_type":"imov","_id":"pzIxF2MB3029rqSru8Tt","status":400,"error":{"type":"mapper_parsing_exception","reason":"failed to parse [date]","caused_by":{"type":"illegal_field_value_exception","reason":"Cannot parse \"0000/00/00 00:00:00.000\": Value 0 for monthOfYear must be in the range [1,12]"}}}}]}

Seems odd cause the date beeing sent is beeing checked with a logger just before the ES writer and the value is

2018-04-30 16:40:42|   1.7|  0.0|INFORM|Attribute(string)                 : `date' has value `2018-04-29 12:20:36.975031'

So how is it beeing converted to \"0000/00/00 00:00:00.000\" as the ES 400 code replys back ?

Also tried to convert this format any other formats but it looks like FME does not recognizes the python created format .

Anyone dribbled similar topic before ?

Regards

python date elasticsearch datetimeconverter Mon,30 Apr 2018 15:43:18 GMT jorge_vidinha
How do I detect fme_date with the C++ SDK for a custom writer? https://knowledge.亚搏在线safe.com/questions/65457/how-do-i-detect-fme-date-with-the-c-sdk-for-a-cust.html

I am writing a custom writer that has a special date format.I would like to detect when a string has the native fme_date,fme_time,or fme_datetime format and convert the internal YYYYMMDD etc.format to my internal format.I am using the C++ SDK,and am unable to find any function that tells me what native format is being used.The best I can find is getAttributeType() and getAttributeEncoding(),but these functions only return FME_ATTR_ENCODED_STRING (an FME_AttributeType enumeration),and 'utf-8'.For a regular string attribute that does not have the 'date' format in the reader (I'm using the oracle reader and connecting it to my custom writer),the attribute type is FME_ATTR_STRING rather than encoded string.Is there any way to detect on the custom writer side what native FME format was used by the reader?And if so,are there convenient format conversion functions available in the SDK?

Using the DateTimeConverter transformer in the workbench is not an ideal solution for our use case since the tables can be huge and checking each and every attribute by hand would be painstaking.I would very much like to be able to detect the formats programmatically and convert formats as necessary.Thanks in advance for any guidance anybody can provide!


The following people have been involved in conversations of similar topics,and I'm hoping you guys might be able to help me.Thanks!

@mark_1spatial @Mark2At亚搏在线Safe @takashi @david_r

date time writer date custom date formatting Wed,07 Mar 2018 16:28:49 GMT mmahmud
How do I create a folder whose name is based on the date the Workbench is run? https://knowledge.亚搏在线safe.com/questions/65095/how-do-i-create-a-folder-whose-name-is-based-on-th.html

Hi all,

Just taking my first steps with FME.I am using the FTPCaller to download two .zip files that are provided on a weekly basis.When I specify an existing folder everything works fine.However,I'd actually like to download the .zips to a folder whose name is actually the date on which the download took place.However,when I try and incorporate this into the FTPCaller's 'Target File' path (e.g.C:\Downloads\@DateTimeFormat(@DateTimeNow(),%Y_%m_%d)\@filename) the translation fails as the file is unable to be written.

If the FTPCaller is unable to create a destination folder on the fly,how would I go about creating the folder?

Any suggestions appreciated!

Thanks!!

date folder Thu,01 Mar 2018 15:12:56 GMT ed80
Add null support in DateTimeConverter https://knowledge.亚搏在线safe.com/idea/62374/add-null-support-in-datetimeconverter.html

I have many entities with DATE attributes.
When I have no value,I set them to null (NullAttributeMapper).

But DateTimeConverter generates a WARN for each null value and rejects entities,so the logfile is very big and its very slow.

I would like a parameter to ignore null values in DATE attributes (don't log them) and maybe a new output port for null values in DateTimeConverter.

null date Tue,23 Jan 2018 14:40:34 GMT mathieu_ambrosy
Converting dates into weekly cycles https://knowledge.亚搏在线safe.com/questions/59023/converting-dates-into-weekly-cycles.html

Hi,I have a bunch of data in SQL with date stamps and I have had a request to convert the data into our 4 weekly cycles.eg.any dates from 7th Jan to 13th Jan 2017 are a week 1,from 14th Jan to 20th Jan 2017 are Week2 ...Week 3,Week 4 and then 4th Feb to 10th Feb being Week 1 again ongoing.The data continues to be added to and they want me to be able to continue to run this workspace into the future and keep working out on the new data which week is it falling into.Any thoughts

date Fri,01 Dec 2017 02:42:16 GMT garryp
Support a 'Net Work Days' Function https://knowledge.亚搏在线safe.com/idea/57746/support-a-net-work-days-function.html

Add support for an FME date calculation function (either as a datetime function or within a transformer such as DateTimeCalculator) that works on a 5-day week or 'business days' system.Excel has aNETWORKDAYS functionthat takes a start date,end date,and holidays input to do this kind of calculation.

date time date datetimecalculator Fri,10 Nov 2017 23:21:07 GMT fmelizard