ABAP CDS conversion timestamp into Date & Time - sapui5

I've got the following field in my CDS View:
Now when I'm consuming that View in my Fiori Elements app, the data in that field is displayed as following:
Is there any annotation or CAST function in order to fix it and to display timestamp properly as date & time? Within one column?
Would appreciate any kind of help!
Thanks and BR.

Related

Dynamic Temporal Control with both: aggregate date and time in QGIS

I have a data frame with both, dates such as 2021-01-01 and times such as 11:38:17. The frame consists of 1.000 cells.
I would like to use the dynamic temporal control function to show data at a given point of date and time of day.
Unfortunately I can only animate the day. As soon as I want to change the step towards hours, I face to problem to tell QGIS where it can find the time of the data set.
Which query can I use to aggregate date and time to one column?
Thanks in advance
Use the function concat in the field calculator as follows:
concat("date", "time")
"date" — field with years and months; "time" — field with time.
In the description of the function you will see examples.
Maybe combining the columns will not be enough. To do this, you need:
Resave the layer in GeoPackage or GeoJSON (SHP does not recognize the date and time together).
Create a new field with a date and time value as follows (in the field calculator too):
— select the type of the new column "Date and time";
— in the field with the expression, write the name of the combined field. For example, "datetime".
If I understood the question correctly, then the method is.

IBM i (AS400/ISeries) - Adding days to date field in WRKQRY

I have a decimal date field (TDDATR) that is in the YYYYMMDD format.
I would like to create a field that is TDDATR + 30 days but I am unable to.
Using 'Define Results Field' I have tried a few things;
Simply doing this;
TDDATR + 30 DAYS
But it returned this error: Labeled duration not used correctly.
I tried using the DIGITS and SUBSTR commands to create a field in the DDMMYYYY format and then +30 days but got the same error.
Same as above but in the DD/MM/YYYY format - same error.
Using DATE(TDDATR) but all I see is +'s in the field.
Using DATE( ) on the fields created in step 2 and 3 - still get +'s
I've ran out of ideas - any help would be greatly appreciated.
Query/400 lacks a lot of the features that an SQL based interface has.
I'd urge you to consider switching to Query Manager (STRQM) which is a fully SQL based product. You can even convert Query/400 queries to Query Manager queries with the RTVQMQRY command by having the ALWQRYDFN parm set to *YES.
The other option that IBM is pushing is Web Query. Again, fully SQL based and you can convert Query/400 queries into it.
Having said that, the problem is that FLD + 30 DAYS only works when FLD is a DATE data type. Query/400 includes a DATE() function to convert non-date types into date. But it's very limited in that it only works with character fields formatted according to your job defaults. Assuming you're in the US, it'd only work with a character value of '07/01/15'.
You could do a lot of manipulation in Query/400 and end up with a result field that meets DATE()'s requirements. But a better solution would be to create an SQL view over your table and have your numeric date converted into a date data type in the view.
You can find code examples that show how to convert a numeric YYYYMMDD to a actual date data type in the view. However, I'd recommend create a user defined function (UDF) that will do the conversion for you. That will make it much easier to use in the view and to reuse in other places.
If you'd like, there's an open source package called iDate, that includes all the code required for convert to/from date data types.
Download that, install/compile it and your SQL view becomes
select ... idate(TDDATR,'*CCYMD') as TD_DATE
from myfile
The use of days is as follow
Field Expression
CURDATE_30 days(current(date)) + 30
The solution to your problem is: given the field A dec(8,0)
Field Expression
YYYYMMDD_ date(substr(digits(a),5,2)||'/'||
substr(digits(a),7,2)||'/'||
substr(digits(a),3,2))
NEXT_MONTH DAYS(YYYYMMDD_) + 30
Remember to check the date format in your job description. In the example the format is MDY or MM/DD/YY.
More info here
Based on the information here, I created the below 2 fields;
TDDIGI DIGITS(TDDATR)
TDDAT1 SUBSTR(TDDIGI,7,2)||'/'||
SUBSTR(TDDIGI,5,2)||'/'||
SUBSTR(TDDIGI,3,2)
From here I was able to create a date field;
TDDAT2 DATE(TDDAT1)
Which allowed me to perform the necessary calculations.
The format of TDDAT1 is based on your job description which can be found by;
WRKJOB
Option 2
Page down
Date format..: X
Mine was *DMY, so TDDAT1 was formatted based on this.

Date display in a drupal view

I would like to display a list of dates in a view, but the problem is that the dates are recorded in SQL format.
I would like to convert this date to my local date format, I'd have to be able to change the field data output format
How can I do this??
Thanks by advance
I found this solution :
I made modification in the "hook_field_formatter_view()" of my date-time field module.

Spring Property Editor for Date divided in three different fields

I'm trying to set up a form in which user's supposed to enter his/her birthday using three different input fields (day, month, year).
What's Spring MVC's way of:
a) prefilling those inputs when showing the form coming from a Date object.
b) getting it from the user, validating and putting into a Date object?
EDIT:
Here's an example link to how we'd like it look: yahoo registration
In spring mvc, for the default, it can't automatically convert the object as this date to a Date type object, so you just get the string in controller, so before get/post the request to server, you should combine these year, month, day together. In controller, you convert the string to Date with java. and it's the same that the controller should return a string, then in the page, you can use js to split it. But I recommend you choose a datepicker plugin, it will be better and save a lot of work.
Hey #user1241320 you can do format his/her birthday from view tier with calendar of any one javascript framework, for example, JQuery.
I hopes these helps :)

GWT to get value from date field

I am using GWT ext and trying to get the values from page and setting it in pojo class.
Except date field all the values are obtained using
(TimeField) ComponentMgr.getComponent(id[2])).getText())....
But while using the same snippet for date field it fails to perform.
Can any one help me with this issue please......
This works fine for me:
dateField.getText();
If you want to convert a string to a date field, you'll have to parse it. Bear in mind that there are already out-of-the-box date pickers in GWT 1.6. If you're using a version that does not come with date pickers, there are several projects like this.
I have also used date field many times.
DateField field = new DateField();
field.getValue();
This will return value as Date instance.So If your pojo has date property then you need to parse it.
For the string value you should go for getText() method.