Named Query in ssas

  • D/A,

    am using named query in ssas to select my table..datetime column results as below

    11/19/2009 12:00:00 AM

    Need to display without the time

    11/19/2009 00:00:00

    also how to change dateformat in result.

    Thanks

  • In the named query or in a database view you can use the following to return just the date portion:

    dateadd(dd,datediff(dd,0,),0)

    ----------------------------------------------------------------------------------------
    Dan English - http://denglishbi.wordpress.com

  • Hi,

    given query works in query analyzer... but in named query(ssas) still the time reflects with date.

  • Then you will need to use the convert(varchar(10), , 101) and you would get a result in the format of mm/dd/yyyy.

    You will just need to specify the style code for your output - Cast and Convert (Transact SQL)

    ----------------------------------------------------------------------------------------
    Dan English - http://denglishbi.wordpress.com

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply