Re: CONVERT help
From: Ron (Ronnie.Bell_at_gmail.com)
Date: 11/02/04
- Next message: Cirrosi: "Re: Too many connections"
- Previous message: David Gray: "Linked Server (Oracle 9i)"
- In reply to: jobi: "Re: CONVERT help"
- Messages sorted by: [ date ] [ thread ]
Date: 2 Nov 2004 06:49:04 -0800
That worked great, thanks.
"jobi" <jobi@reply2.group> wrote in message news:<cm7fbr$p2a$1@reader08.wxs.nl>...
> try
> SELECT
> CONVERT(varchar, getdate(), 101) + '-'
> + CONVERT(varchar, getdate(), 101) + ', '
> + substring(CONVERT(varchar, getdate(), 100),13,7) + '-'
> + substring(CONVERT(varchar, getdate(), 100),13,7)
> AS 'secinfo'
>
> jobi
> "Ron" <junkmail801@hotmail.com> wrote in message
> news:e63522b1.0411010911.6480a25c@posting.google.com...
> > Hello,
> >
> > I am having trouble converting to a time format like so: 3:00PM. I
> > keep getting 24 hr time formats. Here is the query:
> >
> > ---
> > SELECT sections.sec_id, classes.class_code,
> > CONVERT(varchar, sections.sec_date_start, 101) + '-' +
> > CONVERT(varchar, sections.sec_date_end, 101) + ', ' + CONVERT(varchar,
> > sections.sec_time_start, 108) + '-' + CONVERT(varchar,
> > sections.sec_time_end, 108) AS 'secinfo'
> > FROM sections, classes
> > WHERE sections.class_code = classes.class_code
> > ---
> >
> > From what I can gather, 108 is supposed to convert time to my desired
> > format, but it returns 24h time values instead... What am I missing?
> > Thanks in advance for the help.
> >
> > --Ron
- Next message: Cirrosi: "Re: Too many connections"
- Previous message: David Gray: "Linked Server (Oracle 9i)"
- In reply to: jobi: "Re: CONVERT help"
- Messages sorted by: [ date ] [ thread ]