views:

39

answers:

2

Hi friends,

I'm a drupal newbie...

I have created a block with View Module to list events (title, event date) at homepage. dates are being entered into textbox and such format as below;

December 5-7, 2010

December 4-6, 2011

July 17-19, 2011

...

When I set Sort Criteria as date, it just mess :/ it doesn't sort chronological. any idea?

Appreciate helps so much!! Thanks a lot.

+3  A: 

Most likely your dates are sorting by alphabetical order rather than chronologically. Install the CCK date module, and instead of defining the event date as a text field, define two fields, one for event start date and the other for event end date. You can still get your desired output using views (you might have to theme the view to get exactly what you want), and you'll be able to have it sort appropriately.

Dan U.
so there is no way to sort the current format, I'm changing it as your advice. thanks a lot! :)
artmania
+1  A: 

Yes, date module is preferrable with popup submodule.

Another solution: use computed field for cck. Here add code that will convert this strings to datestamp as saveable value. So in Views you now can sort by this field.

Nikit