Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

display date as month and year

Status
Not open for further replies.
Apr 3, 2002
25
FR
How do I convert a full date to show just the month and year? i.e. 02/03, 03/03 etc

Cheers
G
 
If it's a date field, right click on the field and choose Format Field. You can then choose one of the available formats or customize your own format. Mike
If you're not part of the solution, you're part of the precipitate.
 
Sorry I didn't really explain this very well.

I need to be able to group the date values by month and year to display the totals in a chart. I have a formula to show the month Month({date])and group by that but my data spans a number of years. The result is that all Jan data gets displayed together regardless of the year. How do I avoid this?

Cheers
G
 
Create the following formula to show results 02/03. The problem is that any sorting will be 02/01, followed by 02/02 with 1999 being the last year shown:

Use this for displaying the month/year:
datevar dat:={date};
stringvar mnth;
stringvar yr;
yr:=right(totext(year(dat),0),2);
mnth:=totext(month(dat),"0#");
mnth + "/" + yr

Use this one to sort by year/month:
datevar dat2:={date};
stringvar mnth2;
stringvar yr2;
yr2:=right(totext(year(dat2),0),2);
mnth2:=totext(month(dat2),"0#");
yr2+ "/" +mnth2 Mike
If you're not part of the solution, you're part of the precipitate.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top