[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

John Pryor

7/11/2002 1:10:00 AM

I have a select statement that has a where clause that
compares a timestamp to a column value. I'm using the new
DateTime value from .net and am trying to get a string
value that equals a format string like this:

{ts 'yyyy-MM-dd HH:mm:ss'}

with the single quotes included. The problem I'm having is
getting the single quotes to show up. Has anyone solved
this problem, thanks.
3 Answers

NETMaster

7/11/2002 11:01:00 AM

0

like this?

DateTime d = DateTime.Now;
String s = String.Format( "{{ts '{0:yyyy-MM-dd HH:mm:ss}'}}", d );



--
NETMaster (Thomas Scheidegger)
http://www.cetus-links.org/oo_c...



"John Pryor" <jpryor@usa.net> wrote in message news:359c01c22866$fdd07eb0$9de62ecf@tkmsftngxs01...
> I have a select statement that has a where clause that
> compares a timestamp to a column value. I'm using the new
> DateTime value from .net and am trying to get a string
> value that equals a format string like this:
> {ts 'yyyy-MM-dd HH:mm:ss'}
> with the single quotes included. The problem I'm having is
> getting the single quotes to show up. Has anyone solved



(Niel Sutton [MS])

7/11/2002 9:16:00 PM

0

Does the code that was posted sufficiently answer your question?

-------
Thanks,
Niel Sutton
Microsoft

And now a word from the lawyers: This posting is provided "AS IS" with no
warranties, and confers no rights.

Got .NET? http://www.got...


John Pryor

7/12/2002 1:27:00 PM

0

Yes! I was trying to do the formatting inside of
the 'ToString' of the DateTime object instead of letting
the 'Format' string do most of the work.


>-----Original Message-----
>Does the code that was posted sufficiently answer your
question?
>
>-------
>Thanks,
>Niel Sutton
>Microsoft
>
>And now a word from the lawyers: This posting is
provided "AS IS" with no
>warranties, and confers no rights.
>
>Got .NET? http://www.got...
>
>
>.
>