Problems with the type of cloud DB HMS - huawei-mobile-services

I have a problem with the Cloud DB
Message:{"defaultName":"AGCError","name":"database-server","errorCode":{"code":"2052","message":"the input object is invalid."}}
I don't know what could be the reason ?

As per the Huawei Documentation, The error code 2052, it is described as “invalid input object”. So please check your input value or object
Below might be the causes. Please check:
Check any field longer input values which you declared as string. Because string data type field maximum value range is 200 character only. If the string contains more than 200 characters, you are advised to use the Text type. Refer -
https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-clouddb-data-type-0000001080815898#EN-US_TOPIC_0000001176121166__en-us_topic_0000001127251477_table2376546172218
Check the date field format. Because the date format should be (yyyy-MM-dd HH:mm:ss sss) like below

Related

Date and Time Validation Checking in freemarker

I would like to check the given date and time against the following formats.
Date -- {YYYYMMDD},
Time need to check with four formats -- {HHMM, or HHMMSS, or HHMMSSD, or HHMMSSDD}
Above date and time formats needs to be checked using freemarker,
How to check and validate in freemarker? ..
Please suggest
Validation (like input validation) is normally not done in templates. So if you parse strings with ?date(pattern)/?time(pattern), and the format doesn't match, the whole template terminates with error. If you just need to figure out which of those formats a string input is in, you could use the length (?length) and/or regular expressions (?matches(regexp)).

GEE Feature Collections and Dates

I have a fusiontable based feature collection in Google-Earth-Engine that includes a date column. I would like to cast the FC into an empty image and display with graduated colours for increasing dates - so that when the Inspector is used a human readable date is displayed.
var empty64 = ee.Image().toInt64();
var outlines = empty64.paint({
featureCollection: SomeFeatureCollection,
color: 'StartDate',
});
If I add this to the map as a layer I get the date as a 13-digit format that I can't read. How can I change this?
Thank you!
Per the API reference for Image.paint, color must be an object name or a number. To me, that means the EE API will interpret the object as a number, meaning a Date object will be converted from a string to a numerical representation. In this case, that's the "milliseconds since epoch" format.
Without a way to add metadata to a FeatureCollection (i.e. so you could store the associated datestring along with the other parameters of the feature), I don't think you can show a human readable date in the inspector.

Joomla 3.4.5 Form Field Calendar shows 1970-01-01 instead of empty

I'm stucking with this issue:
I use in fomrs the calendar form field, MySQL database field for this is set to DATE and defaults to 0000-00-00
Form field definition in xml uses
format="%Y-%m-%d"
default="0000-00-00"
On the frontend always appears 1970-01-01 instead of an empty field.
I searched the net but can't found a solution how to get an empty field if there is the zero in database. Can anyoune help me out?
The field for storing this date didn't allow for NULL values, and therefor used 0000-00-00 as default (it's a date field). Thus I decided to see what happened when I changed the field in the database to allow for NULL values and set the value for the specific record to NULL. Et voila... Problem solved. No more "strange date" display.
However... When saving the date-field, Joomla decided that it should be stored as 0000-00-00, making the display bogus again. Therefor I had a look at the model and added the line:
if ($data->birth_date == '0000-00-00') { $data->birth_date = ''; }
Before returning $data in protected function loadFormData().
Now to finish it off, since the listing still displayed "0000-00-00" I had a look at that model for the listing and added
$oneItem->birth_date = ($oneItem->birth_date == '0000-00-00') ? "" : $oneItem->birth_date;
before it returned the $items in public function getItems().
You have set the default to: 0000-00-00.
This is a time way before computers were invented, php defaults back to the below if the date is invalid or invalid
1970-01-01
Therefore it will default to that as its as far back as it can go.
Set an actual default date or set to NOW to load in current date.

create categorical variable in sas based upon date

I want to create a categorical variable based upon date and input the following code.
data temppricedata;
set SASHELP.PRICEDATA;
date_group='';
IF (date>='MAR2002'd) THEN
date_group='new';
IF (date<'MAR2002'd) THEN
date_group='old';
run;
However I got error like
ERROR: Invalid date/time/datetime constant 'MAR2002'd.
ERROR 77-185: Invalid number conversion on 'MAR2002'd.
I am sure the format follows sas date format which is MONYY.
I do not know how to correct this.
As #Jeff mentioned, the correct way for specifying SAS date constants is DDMONYY or DDMONYYYY.
data temppricedata;
set SASHELP.PRICEDATA;
length date_group $3.;
IF date >= '01MAR2002'd THEN date_group='new';
ELSE IF date < '01MAR2002'd THEN date_group='old';
run;

convert date to xml type date ('YYYY-MM-DD"T"HH24:MI:SS)

the user enters date in mm-dd-yy format. I have to convert this into ('YYYY-MM-DD"T"HH24:MI:SS) how can i do this in vb.net
Thanks
use DateTime Parse or ParseExact methods (or their Try... variation)
then ToString with your format string the resulting value if it is valid, otherwise tell user to enter a better value.
I don't actually speak VBian so I can't provide sample code.