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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Year() Function Problem 1

Status
Not open for further replies.

MitchPitt

MIS
Jan 16, 2003
25
US
When I try to format a date to get the Year, it will have 2/3/1997 turn into 1,997.00. How do I get rid of the Decimal and also the comma format so when I use the formula it will just have 1997?
 
Hi Mitch,
---------------------------
Cstr(Year({your_date}),0,"")
---------------------------

The zero indicate zero decimals

The "" indicates no thousands separator.

Cheers,
- Ido CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Year({DateField}) will return a number. All you need to do is format the number, no additional formulae required. Software Sales, Training and Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top