DATE FORMAT in SQL Server

Hello,

I am trying to create an object with the date format “Mmm-YYYY”.
When the users clicked on the Values button, the lov should show “Jan-2004” and it should bring back January month data for an instance.
I would appreciate for your help.

BO 6.1b
SQL Server 2000.

Thanks
Ravi.


Ravi_Pazhani (BOB member since 2002-08-20)

Ravi – the data column that this LOV is for – it’s a true date column, and could have any day of the month?

If so, you might want to investigate using a calendar table, which for each true date, has other columns, such as Month-Year. Then you could build the Month-Year Object and LOV on that column. Look for Steve Krandel’s “Smart Calendar” from his 2003 Conference presentation on Empowering End Users Through Smart Universe Design.


Anita Craig :us: (BOB member since 2002-06-17)

I think there is a CONVERT or FORMAT function in SQL Server. You could try those.

Judy


JMulders :us: (BOB member since 2002-06-20)

Judy’s right.
Have a look in your SQL Server on line reference at CONVERT and CAST and how they handle dates. Sometimes you need to convert dates to varchar and back again to get them displaying as you want.