Mario..
Here is one way of doing this.... You substitute GetDate() with your dates.
select Cast(left(DateName(mm,GetDate()),3) as varchar(3))+' '+
Cast(DatePart(dd,GetDate()) as varchar(2))+' '+
Cast(DatePart(yyyy,GetDate()) as varchar(4)) as currDate,
Cast(DatePart(hh,GetDate()) as varchar(2))+':'+
Cast(DatePart(mi,GetDate()) as varchar(2))+':'+
Cast(DatePart(ss,GetDate()) as varchar(2)) as currTime
Joe
On Mon, 18 Nov 2002 12:05:12 -0500 "Ciliotta, Mario" <[EMAIL PROTECTED]>
wrote:
> Hi All,
>
> I have a questions, I am using Sql Server 7.0
> and I have field called Event_Start_DateTime
> and I would like my query to be able to return
> to me two fields
> the date and the time
>
> ie
>
> The field contains: 12/12/2002 7:30:00AM
>
> and I would like my query to return:
>
> Dec 12 (Start Date)
> 7:30 PM (Start Time)
>
> I know how to do it in CF, but I have many
> records returned and I would prefer to have my
> database do some of the work, instead of my
> cuff server doing all the work.
>
> I believe that there are CAST and CONVERT
> functions but I cannot get it to work.
>
> Thanks
>
> Mario
>
> This message is for the named person's use
> only. It may contain sensitive and private
> proprietary or legally privileged information.
> No confidentiality or privilege is waived or
> lost by any mistransmission. If you are not the
> intended recipient, please immediately delete
> it and all copies of it from your system,
> destroy any hard copies of it and notify the
> sender. You must not, directly or indirectly,
> use, disclose, distribute, print, or copy any
> part of this message if you are not the
> intended recipient. CREDIT SUISSE GROUP and
> each legal entity in the CREDIT SUISSE FIRST
> BOSTON or CREDIT SUISSE ASSET MANAGEMENT
> business units of CREDIT SUISSE FIRST BOSTON
> reserve the right to monitor all e-mail
> communications through its networks. Any views
> expressed in this message are those of the
> individual sender, except where the message
> states otherwise and the sender is authorized
> to state them to be the views of any such
> entity.
> Unless otherwise stated, any pricing
> information given in this message is indicative
> only, is subject to change and does not
> constitute an offer to deal at any price
> quoted. Any reference to the terms of executed
> transactions should be treated as preliminary
> only and subject to our formal written
> confirmation.
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm