InfoPath/Sharepoint Date problem

H

HighlanderMom

Hi. I have an Infopath form that is filled out on our Sharepoint site. The
sumbit button creates a title using the reason for the form and the date on
the form.

My problem is while the date is formatted properly in Infopath it gets
changed when the form is submitted. It should be Sick_05-14-2009 (using the
formatting of 1/2/2009) but the form title show up as Sick_2009-05-14 when
it's posted.
I have tried all of the different formats for dates and I've even tried to
make the field at text field but it still changes it.

Does anyone know how to do this?

Thanks!
 
M

Mark L

Try this maybe...create a column in the form library that you publish your
form to and create the column as a date type. Then, when you are publishing
the form, in the wizard when you are promoting the properties, select the
coumn that you crated in the form for the date and select modify, and in the
first drop down 'site column group', select (This document Library), then in
the second drop down 'Column Name' select the column you created in the form
library. It will essentially combine them, hopefully coming out in the
format you chose in the form library settings...
 
S

sboyd

This didn't help but thanks for trying!

--
HighlanderMom
"You should be careful what you wish for or you may get it."






- Show quoted text -

I wanted to do something similar and this is the way I was able to
accomplish the task. I created a formula and used the 2nd formula to
set the filename. I also didnt' want it to change once the filename
was created so I added another field for "Submitted" and set a rule
that if it wasn't "Y" to set it to "Y". Then I created the formula
that if Submitted is "N" to set the filename field to this formula

normalize-space(concat(substring(@MyDateField, 1, 4), "_", substring
(@MyDateField, 6, 2), "_", substring(@MyDateField, 9, 2), "_",
@Aircraft_Id, "_", @FLight_Id))

I moved this rule in front of the Submitted rule so it should only
happen one time.
My formatting was different but you should be able to do the same
thing and rearrange the substrings to get the format you want.
 
S

sboyd

Hello,

Date format should be dd/mm/yy, such as 28/05/09.








- Show quoted text -

This worked for me when the date field is formatted as 05/28/09. My
expression field is formatted as a Date Field and has the following
formula

concat(substring(Date, 9, 2), "/", substring(Date, 6, 2), "/",
substring(Date, 3, 2))
This is the xpath formula concat(substring(my:Date, 9, 2), "/",
substring(my:Date, 6, 2), "/", substring(my:Date, 3, 2))


Results are 28/05/09.
 

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