BrowseDialog


Author
Message
Larry Caylor
Larry Caylor
StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K

Don’t know if it has already been suggested but I’d like to see the BrowseDialog search criteria support a DatePicker control for date fields.

-Larry

Replies
Larry Caylor
Larry Caylor
StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K

In SQL server any date stored as type DateTime or SmallDateTime is going to have a time component so you would need to eliminate it to search for a date equal to a specified date. One way to do that would be to use a select statement similar to the following

 

SELECT * FROM [Table] WHERE CONVERT(Char(10),[DateTimeColumn],101) =@SearchDate

 

If you were using a DateTimePicker to specify the search date, your search parameter would be something like

 

@SearchDate = String.Format(“{0:MM/dd/yyyy}”, DateTimePicker.value)

 

Another possibility I considered was adding a computed column (DateOnly) to my table. It would be defined as

 

CONVERT(Char(10),[DateTimeColumn],101)

 

I could then search on this in the BrowseDialog as text field by entering my search date in mm/dd/yyyy format. Some problems with this approach are that >, < searches wouldn’t work and  the Database Deployment Toolkit does not support computed fields which means I would have to modify the database after deploying it. I would also have to use the database and not DDT in ObjectMapper.

 

Regardless on whether or not you can fix this in the framework I suggest adding a “Between” for DateTime fields and displaying two DateTimePikcers for beginning and ending dates when selected  Most of the time, my users are looking for a specific date or a date that falls within a date range.

 

-Larry

 

 

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
I will look into this.  Thanks.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search