Visio Guy

Visio Discussions => General Visio => Topic started by: Kiwii on July 25, 2014, 04:23:11 PM

Title: Gantt Chart - how to change date format to dddd
Post by: Kiwii on July 25, 2014, 04:23:11 PM
Hi,

I am new to visio and need some help.

I am currently working on a Gantt chart in Visio 2010. 
The tasks are to occur every week, so I would like to make it general and not date specific.
Example ( from 8/5/2014 to Monday (dddd))

I have attached the visio/pdf file and highlighted the dates (in yellow) that I would like to change to dddd (i.e. Start/Finish/ Mon -Friday August 4-10).

Kindly let me know, any help would be appreciated.

Thank you!!
Title: Re: Gantt Chart - how to change date format to dddd
Post by: Kiwii on July 25, 2014, 05:54:26 PM
anyone?
Title: Re: Gantt Chart - how to change date format to dddd
Post by: wapperdude on July 25, 2014, 06:08:34 PM
Patience grasshopper!  Most contributors have jobs.

I suspect that not too much has changed from V2007 to V2010 re Gantt charts...
  1.)  Formatting is limited to what is shown in the dropdown lists.
  2.)  Any custom formatting applied to standard shape gets clobbered by add-on code that runs behind the scenes.

That's been my experience, but it's possible someone else may have additional input.

Wapperdude
Title: Re: Gantt Chart - how to change date format to dddd
Post by: Yacine on July 25, 2014, 06:18:39 PM
That's not trivial, because you are using a visio addon.
I've had a look at the available options, but there doesn't seem to be one for formating the date.
One could format the date shapes manually, but as they generated by the code, they will probably be overwritten everytime the chart is updated.
--> write your own chart ??? ??
Title: Re: Gantt Chart - how to change date format to dddd
Post by: Kiwii on July 25, 2014, 06:34:35 PM
Thanks for the advice guys,

what to do you mean by --> write my own chart ?
Title: Re: Gantt Chart - how to change date format to dddd
Post by: Yacine on July 25, 2014, 08:42:09 PM
I mean get rid of the addon and setup an own solution.
That requires you to dig deep in Visio.
It's up to you to decide, whether it's worth it. (several weeks or months of googling, coding and asking in forums)
Title: Re: Gantt Chart - how to change date format to dddd
Post by: wapperdude on July 26, 2014, 05:36:45 AM
Attached file shows various date formats based upon using either the NOW() or DATE() functions.

The text is displayed via using the Insert>Field dialog.  Specifics can be seen either in the shapesheet (User-defined section) or via the insert > field dialog.

However, the add-on will probably clobber these formulas.  You could create a separate shape to show the date and place it or glue it on top of the Gantt chart dates.  It ought to be easy enough to reference the necessary date info from the Gantt chart.

HTH
Wapperdude
Title: Re: Gantt Chart - how to change date format to dddd
Post by: wapperdude on July 26, 2014, 06:36:09 AM
Attached file shows formatting based off Gantt chart start / stop cells.  The reference shape ID is manually coded into the shapesheet entry in the User-defined section.  Requres the Formatex fcn.

Works, but, seems like a lot of effort if Gantt chart is large.

Wapperdude.
Title: Re: Gantt Chart - how to change date format to dddd
Post by: Yacine on July 26, 2014, 07:46:38 AM
Open the document stencil (File/Shapes).
Select the "task bar" shape and open it.
Select the shape, Right Mouse Click and open shapesheet. (You must be in developer mode)
Change the format of the rows prop.start and prop.end from "ddddd" to "dddd".

I don't know however if these changes are permanent, or if they are set back to the original values, when you refresh the drawing. In this case a macro could do the changes after each refresh.

HTH,
Yacine
Title: Re: Gantt Chart - how to change date format to dddd
Post by: wapperdude on July 26, 2014, 04:13:13 PM
Nice job, Yacine.  That seems to be reasonably robust.  Went thru some of the option, date, add task, add column changes and the format seems to hold...at least for limited experimenting.

BTW, other format options could be used, e.g., ="ddd, dd MMMM yyyy" works fine, and produces sth like Mon, 28 July 2014

Updated the Visio file to show this approach.

Wapperdude
Title: Re: Gantt Chart - how to change date format to dddd
Post by: Yacine on July 26, 2014, 09:20:22 PM
Thanks for the flowers.
It's a pity those add-ons are so untransparent.