Input DateTime Format

Input DateTime Format

  

Hello all out there,

I have a date input widget on a form, which is based on a datetime SQL SERVER column. I have confirmed the Input_Calendar Widget to save just the date part of the timestamp. BUT, when I open the form for editing, the whole timestamp is shown (just like "Completion Data" in the attachment). Is there a way to show just the date part of the timestamp?

Thanks in Advance,


Marios Tofarides


 

I think that you need to format the date to remove the time in the Preparation after you get it from the query.  You want to make sure you modify Get ...ById and not the EditRecord.  I'm not sure if there is anything on the field itself for formatting.

wrote:

Hello all out there,

I have a date input widget on a form, which is based on a datetime SQL SERVER column. I have confirmed the Input_Calendar Widget to save just the date part of the timestamp. BUT, when I open the form for editing, the whole timestamp is shown (just like "Completion Data" in the attachment). Is there a way to show just the date part of the timestamp?

Thanks in Advance,


Marios Tofarides


 

 
 Hi Marius,

Try to put the Input_Calendar Widget atribbute named "Show Time" to False.
I think it will solve your problem.

Best Regards,
Diogo Miguel
Dear Diogo,

I have already changed the specific setting. I do get just the date when I input a new based on the calendar widget. My problem is when the form is loaded. That's when I get the problem.

Rebecca, thanks for the tip, but that didn't work either. I tried to Change the format of the data and reassign the newly formatted value to the field, but that didn't change.

Marios
Marios Andreas Tofarides wrote:
Dear Diogo,

I have already changed the specific setting. I do get just the date when I input a new based on the calendar widget. My problem is when the form is loaded. That's when I get the problem.

Rebecca, thanks for the tip, but that didn't work either. I tried to Change the format of the data and reassign the newly formatted value to the field, but that didn't change.

Marios
 
 Hi Marios.

Hum..ok. Well, try to create a date parameter and associate him to your Input_CalendarWidget, and in your Preparation assign your SQL value to the date parameter.
Hi Marios!

You're getting the time there because your attribute is a datatime and it is stored as a datetime in the database. Even though you're setting the calendar to just showing date after you put it to the database and re-bind your input with it you'll get the time along with the date.

First thing, why is your field a datetime if you're editing it as a date only?

Possible solution:
  • Bind your input to a date local variable instead of the record attribute. You'll have to fill in the variable on preparation and assign it back to the editrecord's record when you want to send it to the database.

Cheers,
André
Hi all, The field was in DateTime Format because at the time SQL Server did not support a separate "Date" DataType. I changed the Entity DataType to "Date" from Integration Studio and it worked. Thanks to all for the assistance!

Best Regards,


Marios Tofarides