StrataFrame Forum

DateBox vs. DateTimePicker on Browse Dialog

http://forum.strataframe.net/Topic28526.aspx

By Sam Tenney - 9/28/2010

I am very glad that SQL Server 2008 provides a new Date data type so I do not have to deal with the time portion of the DateTime data type.

I really like the new StrataFrame DateBox that works well with the new Date data type.  The newest SF documentation suggests using this new DateBox instead of the old DateTimePicker when working with simple dates.

Shouldn't the Browse Dialog be using a DateBox instead of a DateTimePicker when searching for simple dates?

Also I cannot seem to find a way to control the format of the date search control (currently a DateTimePicker control) on the Browse Dialog.  The format seems to be fixed at M/d/yyyy.

Sam
By Edhy Rijo - 9/28/2010

Hi Sam,

When using a date field in a browser dialog, usually you need to setup a range of the same file to search From and To.  Following that scenario in your BD search fields, you need to create the same field but with Unique Keys as follow:

Search From Field:
Unique Key: MyDateField_From
In the General Tab, Search Style: Greater Than or Equal To
In the Date Tab, Time Action: Set Time To Start of Day (Midnight)

Search To Field:
Unique Key: MyDateField_To
In the General Tab, Search Style: Less Than or Equeal To
In the Date Tab, Time Action: Set Time To End of Day (23:59:59)

With above setting you can search for a particular date and will show the records correctly.

About the BD using a datetimepicker, I don't know why they have not implemented a datebox yet, but could be because the datetimepicker support both date and time and DateBox not.
By Sam Tenney - 9/28/2010

Thanks Edhy,

I have been using the date range approach already, but it seems odd that I cannot control the format of the date in the DateTimePicker on the Browse Dialog and I wish the control used was a DateBox control instead of a DateTimePicker control.  SQL Date types should use a DateBox and SQL DateTime types should use a DateTimePicker.

Sam
By Edhy Rijo - 9/28/2010

Hi Sam,

I understand, I believe it is not possible since we don't have access to the dynamic controls of the BD.  I think that this has been requested before, but do not recall.