> If I have a SQl Server datetime field, and I want to
> return it like
> 'mm/dd/yy', is there a function I can use in the select
> statement to do this?

> Brook

afaik not a simple one...

you can however hack a few of them together or create a udf in sql
server to do this:

create function dbo.mydate
  @mydate datetime
as

return replace(str(month(mydate),2,0),' ','0')
        + replace(str(day(mydate),2,0),' ','0')
        + right(str(year(mydate),4,0),2)
go


or something to that effect...

str() formats a number as a string (think numberformat but not nearly
as powerful), day(), month() and year() return the numbers from your
date...


s. isaac dealey   954.927.5117

new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework
http://www.sys-con.com/story/?storyid=44477&DE=1
http://www.sys-con.com/story/?storyid=45569&DE=1
http://www.fusiontap.com




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186168
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to