How to create views with date field of a content type? I am using D6.
I want to create a views with date field using in a content type such as "Photo Gallery".
What i have done are:-


In argument, select Content: Date (Date Appears in: Photo Gallery) then
select granularity as "year", sorted descending, check "Content:Date
save it.
I separately do for both month and day respectively.


What i am getting in URL are like photo-gallery/2010, photo-gallery/2010/2010-10, photo-gallery/2010/2010-10/2010-10/10 for year, month, day respectively.

But i don't want this.

I want Url like for year- photo-gallery/2010, for month- photo-gallery/2010/10 and for day-photo-gallery/2010/10/10
I am stuck here. So how can i do this?
You should be able to do something along these lines in a custom module if the out of the box Date and Views modules don't do it:

First off, create all your Views as Block Displays (eg, not Page Displays with a path defined by Views) with the various arguments in place.  For ease of discussion later on, let's say the View is called photo_gallery with displays of year, month and day.

Then, in your module, define the paths you want, eg:

function YOURMODULE_menu() {

  $items=array();

  $items['photo-gallery/%'] = array(
    'title' =&gt; 'Photos By Year',
    'page arguments' =&gt; array(1),
    'page callback' =&gt; 'YOURMODULE_photos_by_year',
    'access callback' =&gt; TRUE, 
  );

  $items['photo-gallery/%/%'] = array(
    'title' =&gt; 'Photos By Year/Month',
    'page arguments' =&gt; array(1, 2),
    'page callback' =&gt; 'YOURMODULE_photos_by_year_month',
    'access callback' =&gt; TRUE, 
  );

  $items['photo-gallery/%/%/%'] = array(
    'title' =&gt; 'Photos By Year/Month/Day',
    'page arguments' =&gt; array(1, 2, 3),
    'page callback' =&gt; 'YOURMODULE_photos_by_year_month_day',
    'access callback' =&gt; TRUE, 
  );

  return $items;

}


And then for your callbacks, you embed the view you want using the argument styles it wants, which would probably be something like this:

function YOURMODULE_photos_by_year($year) {

  return views_embed_view('photo_gallery', 'year', $year); // eg 2014

}

function YOURMODULE_photos_by_year_month($year, $month) {

  return views_embed_view('photo_gallery', 'month', $year . '-' . $month); // eg 2014-01

}

function YOURMODULE_photos_by_year_month_day($year, $month, $day) {

  return views_embed_view('photo_gallery', 'day', $year . '-' . $month . '-' . $day); // eg 2014-01-04

}


Now the above is all pretty broad strokes typed in directly (typos may abound) and not actually tested (I don't really know the exact format of the dates your Views arguments should be in) but should get you on your way. Things to keep in mind are argument validation (eg photo-gallery/notayear/notamonth/notaday) and paging of results.