Sharepoint Date and Time Field limitation - sharepoint

I created a Date and Time column in a Sharepoint list called EventDate. According to Microsoft documentation the Date and Time column maps to the System.DateTime type.
Now I'm seeing an error message when I try to insert the following date into that column:
Date: 1/1/1800
Error message:
"Invalid date/time value.
A date/time field contains invalid data. Please check the value and try again."
I also tried to use set DateTime.MinValue and I receive the same error message. But if I insert a more recent date like 1/1/1900 it works fine.
Does Sharepoint have a limitation of the minimum value of a Date and Time field?

I found out that if you try to insert the value 1/1/1800 in a Sharepoint Date and Time field manually (using Sharepoint forms) you receive this error:
"You must specify a valid date within the range of 1/1/1900 and 12/31/8900."
Therefore, Sharepoint only accepts values between 1/1/1900 and 12/31/8900.

There is no obvious reason as to why SharePoint limits the storage of the datetime datatype as it does now.
In SQL Server, the smalldatetime columns allows date in the range from 1/1/1900 - 6/6/2079 and the datetime columns are ranged 1/1/1753 - 12/31/9999
So there's no range from 1/1/1900 - 12/31/8900 and I haven't got the slightest idea why the limitation exists.
To make things even worse: SQL SErver 2008 has a smalldatetime2 and datetime2 type (the really just added a 2 to the name :/) wich allows any date (1/1/0000 - 12/31/9999) but even SharePoint 2010 on a SQL 2008 has the same limit
And Kit: using a single line of text is a very poor substitu, as there is no way to validate the values entered by the user

You could try creating a custom field to store the datetime value.
see http://msdn.microsoft.com/en-us/library/gg132914.aspx

Related

Prompt date in report with default today's date?

I am using relation SQL as a source for my query as below
select * from table where date = ?
what I need is when the user runs the report, it should prompt to date parameter. the default date should be the current date and there should be a calendar to select the date.
i am not using any universal here, so don't know what to do?
I think this is going to be as close as you can get.
select *
from table
where date = #Prompt('Enter Date:','D',,Mono,Free,Not_Persistent,,User:0)
Today's date is defaulted, but not selected. Be cautious with clicking on "Now". That will give you today's date with the current system time which is likely not what you want. You could convert your #Prompt function result to a datatype that does not include the time if you want users to be able to click "Now". In my opinion it is simple enough to instruct users to click the highlighted date for today's date.

Why does my Jet Reports NL Lookup not refresh?

We have a Jet Report reading a Dynamics NAV 2013R2 Sales Invoice Line table. We have created it on our system with Start Date and End Date options with a Lookup, =NL("Lookup","Sales Invoice Line","Posting Date"). This works as expected and displays the appropriate list of dates from our test server. Test Server data is a couple years old and the last date is in year 2018.
When we upload the Jet Report to the client and run it, the lookup dates are not refreshed, it displays the same list of dates as our test server (e.g. the last date displayed is in year 2018). How can we force the Lookup to refresh on the client side so it displays the full list of dates?
I have tried uploading the report in design mode and also in report mode. Neither results in the correct list of Dates being displayed.
It turns out there is a limit to the number of rows displayed. I added a filter to the Lookup to sort by Date descending and the latest dates showed up as expected.

Azure Logic App - GetEntities (Azure Table) connector filter returning wrong result

In my logic app one step takes some filtered entities from Azure Table Storage. Filter consist of two conditions:
One field has to be equal to some constant value
Other field (datetime) has be to less or equal than current time minus 10min
It worked ok until last month when it started to return wrong results as seen in the screen below:
And the connector in Edit Mode:
I cannot work out what is happening. If I edit the row in the Azure Table (just click Update without changing anything) it starts to work properly. I thought that maybe the field was set with wrong type, but everything seems ok:
Maybe your error is caused by the wrong type of CreatedDate, you can refer to this post.
Simply put, you insert a time-formatted String into Azure Table data formatted as DateTime. This is shown in the portal as type DateTime, but it is actually a String.
Solution:
1. If you want to insert data of type DateTime, you can specify odata.type, please refer to the following example:
{
"Address":"Mountain View",
"Age":23,
"AmountDue":200.23,
"CustomerCode#odata.type":"Edm.Guid",
"CustomerCode":"c9da6455-213d-42c9-9a79-3e9149a57833",
"CustomerSince#odata.type":"Edm.DateTime",
"CustomerSince":"2008-07-10T00:00:00",
"IsActive":true,
"NumberOfOrders#odata.type":"Edm.Int64",
"NumberOfOrders":"255",
"PartitionKey":"mypartitionkey",
"RowKey":"myrowkey"
}
Reference:
https://learn.microsoft.com/en-us/rest/api/storageservices/understanding-the-table-service-data-model#property-types
https://learn.microsoft.com/en-us/rest/api/storageservices/inserting-and-updating-entities
2. Define CreatedDate as String type, but this is not a very good solution, it is better to insert the correct DateTime data.

Excel Power Query import of SharePoint List data changes date/time values

I have an Excel file that pulls data from a SharePoint list using Power Query. When I compare the date field values in SharePoint e.g. 4/30/20 8 PM they uniformly appear as 5/1/20 1 AM in the Power Query view. This results in the data being shown in the wrong time periods in pivots, etc. Any ideas what is happening? I am not a DBA or SysAdmin so your patience with this question is appreciated! Thanks.
Check the Datatype of your Date(Time) Column and the query Step like "Change Types".
If there is a little globe left in your column header than the Data-Type is set to Date-Time-Zone.
Change the type to "normal" date/time.

Null and date format handling in talend

I have an excel with a date field but the first row in the excel is blank and few other rows are having a date format as MM/dd/yyyy HH:mm:ss.
The data to be loaded into a Postgresql table with the field of data type timestamp yyyy-mm-dd HH:mm:ss.
The excel cannot be modified as it is being downloaded from the cloud and the data is loaded straight away into the table.
I tried using tConvert type but it cannot accept null or " " values in timestamp. I am facing a Null tMap error during runtime in talend. Even if I try to convert from string to date format in order to pass null in tmap, it is changing the date format and showing error.How can this be handled ?
The talend structure is : tFileInputExcel - > TMAP(date field : MM/dd/yyyy HH:mm:ss) -> tConvertType(date field : yyyy-mm-dd HH:mm:ss) ->TMAP(yyyy-mm-dd HH:mm:ss) -> Postgresql Table
Here is the Excel screenshot:
At first, I do not quite understand why do you want to use tConvertType component. After defining a proper schema Talend is changing your data into Java Date object and from that moment format is not important and you don't have to convert it when you want to put it into Postgres table. At least it should not cause NullPointerException.
Consider following steps:
Sample input file
I've prepared some file with date value/space/empty string, solution I'm describing works also with nulls.
Configure tFileInputExcel component
You have to allow taking null values in by checking the Nullable check box. You should also check trim option.
Examine output
After connecting input component to tLogRow null/empty/space values are handled properly.
I hope this will be helpful.
You can capture date format or null handling in variable within tMAP component
that is
var :TalendDate.formatDate("yyyy-mm-dd HH:mm:ss",row1.columnname)
so data flow would be
tFileInputExcel --->tMAP --->Postgresql Table

Resources