SharePoint timestamp issue

A

abrown

I have created and uploaded a form template to SharePoint using InfoPath
2003. I have 4 fields from the form displaying in my form library...3 of
which are date fields. I have the fields set up on my form as dates with no
time but when a value is entered an automatic timestamp of 12:00 AM is
showing up on SharePoint. I only want the date and not date/time to be
displayed. How can this be accomplished Thanks!
 
K

K Dales

SharePoint uses a datetime data type for columns, but you can change the way
it is displayed: From the list settings, click on the column name and then
under Date and Time Format: select Date Only.
 
A

abrown

This is not a SharePoint issue. The columns on SharePoint are pulling from
fields on my form which are linked to a database. The default data type of
these fields are "optional_dataTime.notz". InfoPath will not allow me to
change this...at least I haven't figured out why. I believe this is why a
dummy time of 12:00 AM is populating on SharePoint. My database is set up as
date only...it's not capturing time. How can I get InfoPath to allow me to
change the data type of my dates fields to only display the date on
SharePoint? Thanks.
 
K

K Dales

There are a lot of underlying complexities and steps involved in how
SharePoint interacts with InfoPath and the database underlying the InfoPath
form. So it is not quite that simple.

While I understand that the data type in the database you are using for your
form is date only, SharePoint columns are actually stored in SharePoint's own
SQL Server database. What you see when you look at the SharePoint list are
not the values in your database, but copies of those values in the SharePoint
SQL Server database. At least this is what I understand of how SharePoint
works.

SQL Server 2008 has a pure date datatype, but I don't think SharePoint yet
supports this, and I doubt you are running SQL Server 2008 on your SharePoint
Server, so your date columns in SharePoint are most likely stored in its
internal database as a datetime. It would then be natural that 12:00 am would
be appended as the time part when the value is stored in SQL Server.

So while I am not sure exactly what your setup is, I still think this is
probably why you are seeing them as datetime values in SharePoint. If you
have not checked the setting I mentioned, please see if changing the column
display to Date Only will resolve your issue.
 
A

abrown

Normally, SharePoint will allow you change the column datatype; however, when
you add a field from InfoPath to a SharePoint document library SharePoint no
longer controls the datatype of those columns...they are derived from the
InfoPath form.
I have 2 other forms on SharePoint that are not linked to a database and
their date columns only reflect the date that is stored on the form and not
the date/time as the 2 forms that are linked to a database.
This is an InfoPath issue as InfoPath automatically selected the datatype
for these date fields since the form is linked to an Access database. I can't
get InfoPath to allow me to change the datatype of the date fields that are
linked to the database. They are defaulted to "optional_dataTime.notz". Is
there not anyway to change this?
 
C

Chris M.

abrown,

I had this same problem but figured out a work around.

First I created a new hidden text field in Infopath called DatetoString and
set the value to a concat formula to re-format the date the way I wanted. I
could then use this new field when working with workflows in SharePoint.

concat(substring(StartDate, 6, 2), "/", substring(StartDate, 9, 2), "/",
substring(StartDate, 0, 5))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top