I'm trying to delete all value for a date field of a podio item while updating the rest of the field.
The podio documentaion says To delete all values for a field supply an empty array as values for that field., I passed an empty array for the startDate and endDate field.
Invalid value "[]" (string): Must be a date with time in the format YYYY-MM-DD HH:MM:SS
Please help how can I resolve this
Related
I have this column that contains 'NO RECORD' values that I used to replace the NULL values and I want to change the column type into a date but I get this message :
Conversion failed when converting date and/or time from character string.
Of course, the reason behind it is the No Record values, so how I can keep the strings while changing the column into date, is that possible, because I want to fill my Null Values instead of keeping them empty
Sounds like your requirement is:
Store a date (or datetime) value
But, for a given row, you will not always have a known value
When the data(time) is not available, show users "No Record"
In a relational database, this is best implemented with a column defined with an appropriate date/time datatype (date, datetime, datetimeoffset, whatever is most appropriate), with the column set as NULLable.
When the value is known, store the value
When the value is not known, store it as NULL
That accounts for data storage. How to display data to users is a different subject. No, really. Date/time data is not stored as a string of numbers and punctuation, it is stored in a very specific binary format. When the data is retrieved, it is formatted as the UI requires, even if that's only SSMS. After all, is September 10, 2011 displayed as
09/10/11 (US)
10/09/11 (UK)
11/09/10 (Sortable)
My point here is, if when the date(time) is not known you need to show the consumers of your data the string of characters "No Record", you will need to put in special handling on your UI to check to do this. An example:
SELECT isnull(date_onset, 'No Record') date_onset
from dbo.MyTable
We have a source as a flat file which consists of a date column in format 19/08/2013.
We have a target in oracle table which consists of a date column in format 11-AUG-13.
When we are trying to pass the source column value in target using expression TO_DATE AND
TO_CHAR like
**source column is A ---> Source column
v1=TO_CHAR(A)
O1(output column)=TO_DATE(V1,'DD-MON-YY') we are getting the below error.
Invalid date: [19/8/2013]. The row will be skipped.**
Can anyone please help where I'm going wrong.
Thank you
You need to convert the str to date properly and then infa will load them.
Change the mapping like this -
Change data type in source to a string. read data as string.
Then use your expressions but change the to_date function like below.
v1(var column, data type string)=A
O1(output column, data type date)=IIF(IS_DATE(V1,'DD/MM/YYYY'), TO_DATE(V1,DD/MM/YYYY'),null)
IS_DATE - will check if the data is a date or not, if yes then only it will try to convert to a proper date else put null.
3. Then connect O1 column to a date type in oracle target.
This will make sure all data are loaded and none skipped.
I have a set of date where some of the records have a valid convertible to date text field and other records which are not. For example, "1/1/2019", next record may be "January 1, 1919", next may be "pre-2010", etc.
I need to convert the valid values to a date field.
In MSAccess I can do an update, Set DateField to DateValue(txtDateField) to convert the rows that work to convert. Access would leave DateField as Null for the bad non date type text, but convert the good rows, which is the majority.
How do I do this in SQL? I have tried the convert or cast function but it errors out in update or even select because some of the rows aren't valid. How do I select the valid rows?
Also, FYI, I don't even know what the data values actually are. I just need to convert the ones which are valid and leave the ones with bad values as they are.
Basically user form allowed entry of text into a field which they now want to search on by date. The good values can be easily converted in Access via the DateValue function, any way to do it in SQL?
My question, now I have table customer in Postgresql and contain the column name is update (for keeping track of update customer info date.)
The date format is ex:20170302 but I want to convert to be 02/03/2017.
Note: the datatype of the update is character varying.
I have tried several times to find all the solutions by google but not fix.
First, you should fix the data type to be a proper date or datetime. Don't store dates as strings!
But you are. You can convert the value to a date and then back to a string:
select to_char(to_date(update, 'YYYYMMDD'), 'DD/MM/YYYY')
The documentation contains the formatting elements that you can use.
I have a date in format of YYYY-MM-DDThh:mm:ss
Please provide a GREL expression that increments date to 1 month from the present date value for all cells in the column in openrefine. Thanks!
First you need to make sure the data in the cells is of type 'date' - if the text in the cell is in green then the data is already 'date' type. Otherwise you will need to convert it using the GREL:
value.toDate()
Screenshot - before converting to date
Screenshot - after converting to date
Once you have the data as Date type, then you can use the following GREL to increment by one month:
value.inc(1,'month')
For more on using dates in OpenRefine see https://github.com/OpenRefine/OpenRefine/wiki/GREL-Date-Functions