- Posts: 5
Date filed to text with format yyyy-MM-dd
- Mark Krieger
- Topic Author
- Offline
- User
Less
More
6 years 5 days ago #3501
by Mark Krieger
Date filed to text with format yyyy-MM-dd - Post(3501) was created by Mark Krieger
How do I get a date field to a string field with format yyyy-MM-dd
Trying the date functions with append gets me dates like 2,018-5-6 - with a decimal separator (don't want to change the number formats) and single-digit dates for month and day. And just using a string field with the format yyyy-MM-dd gives just the original field.
Do I need to make a .NET heater for that or is there a built in way?
Thanks
Mark
Trying the date functions with append gets me dates like 2,018-5-6 - with a decimal separator (don't want to change the number formats) and single-digit dates for month and day. And just using a string field with the format yyyy-MM-dd gives just the original field.
Do I need to make a .NET heater for that or is there a built in way?
Thanks
Mark
Please Log in or Create an account to join the conversation.
- FlowHeater-Team
- Offline
- Admin
6 years 5 days ago #3502
by FlowHeater-Team
Best wishes
Robert Stark
Replied by FlowHeater-Team on topic Date filed to text with format yyyy-MM-dd - Post(3502)
Hi Mark,
The solution is quite simple. You just have to define your preferred dateformat in the Adapter settings on the WRITE side. -> General information about usage of Adapters
Attached you´ll find a short example how you can use different format setting in one definition. In your case, you have to switch the certain field DATATYPE to DATE and use the format setting like shown in the screenshot below, that’s all.
In the example, I used also the String Format Heater to demonstrate how youcan mix different formats in one definition.
Note: Because the first WRITE field “String (Adapter)” has no certain DATATYPE (only STRING), FlowHeater use the DATATYPE from the READ side field to format this column with the standard DATETIME format like the second column.
The solution is quite simple. You just have to define your preferred dateformat in the Adapter settings on the WRITE side. -> General information about usage of Adapters
Attached you´ll find a short example how you can use different format setting in one definition. In your case, you have to switch the certain field DATATYPE to DATE and use the format setting like shown in the screenshot below, that’s all.
In the example, I used also the String Format Heater to demonstrate how youcan mix different formats in one definition.
Note: Because the first WRITE field “String (Adapter)” has no certain DATATYPE (only STRING), FlowHeater use the DATATYPE from the READ side field to format this column with the standard DATETIME format like the second column.
Best wishes
Robert Stark
Attachments:
Please Log in or Create an account to join the conversation.
- Mark Krieger
- Topic Author
- Offline
- User
Less
More
- Posts: 5
6 years 4 days ago #3503
by Mark Krieger
Replied by Mark Krieger on topic Date filed to text with format yyyy-MM-dd - Post(3503)
Hi Robert
Wow. Just wow. Thank you so much. The attached file shows it nicely how to do it within the adapter or the format heater. Just the right thing for a beginner like me. And it's even easier than In thought.
Thank you
Mark
Wow. Just wow. Thank you so much. The attached file shows it nicely how to do it within the adapter or the format heater. Just the right thing for a beginner like me. And it's even easier than In thought.
Thank you
Mark
Please Log in or Create an account to join the conversation.
Time to create page: 0.262 seconds