Re: Formatting data in a SP - Access Format() function replacement
From: simon whale (simon_at_nospam.ukdatait.co.uk)
Date: 04/06/04
- Next message: Su Man: "Re: Finding max(sum(sales)) in group by query"
- Previous message: Konstantinos Michas: "Re: Help with these queries"
- In reply to: Chris Strug: "Formatting data in a SP - Access Format() function replacement"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 6 Apr 2004 12:04:52 +0100
Chris
try the following in the query analyser
select convert(varchar, getdate(), 112)
this hsould give you what you are after
Simon
"Chris Strug" <hotmail@solace1884.com> wrote in message
news:u6JI8Q8GEHA.3288@TK2MSFTNGP12.phx.gbl...
> Hi,
>
> I have a Sp that returns a recordset which is used as the datasource for a
> form in an Access ADP.
>
> The query itself is fine, however I want to know if it is possible to
format
> selected fields. For example:
>
> SELECT format("yyyymmdd", DateIn) as Date FROM ....
>
> The records are being output to a table (the SP is actually a SE:ECT ...
> INTO) which I then output to a text file using Access "TransferText"
> function so I can't format the data as if it were being fed to controls on
a
> form...
>
> I guess the simple way of putting it is to ask if there is an equivalent
to
> the Access format("format", field) function in SQL Server (2000) that can
be
> used in an SP. I've found "FORMAT_STRING" but it doesn't appear to be what
I
> need...
>
> Any and all advice is gratefully received.
>
> Kind thanks
>
> Chris.
>
>
- Next message: Su Man: "Re: Finding max(sum(sales)) in group by query"
- Previous message: Konstantinos Michas: "Re: Help with these queries"
- In reply to: Chris Strug: "Formatting data in a SP - Access Format() function replacement"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|