Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Re: Formatting datetime


Message #1 by "Ajay Ovalekar" <ajax@i...> on Sun, 17 Sep 2000 21:01:24 +0530
This is a multi-part message in MIME format.



------=_NextPart_000_00F7_01C020EA.70284FA0

Content-Type: text/plain;

	charset="iso-8859-1"

Content-Transfer-Encoding: quoted-printable



Use this SQL statement to get the date in the format {dd Mon yyyy}



select convert(char(11),hire_date,113 ) from employee



where hire_date is a date field with length 8 bytes



Cheers

AJAX>>>

  ----- Original Message -----

  From: jonathan frascella

  To: ASP Databases

  Sent: Wednesday, August 30, 2000 2:15 PM

  Subject: [asp_databases] Formatting datetime





  I am trying to display the date and time that a user posts a message 

to a message board, but it keeps returning hundredths of a second too.

  

  Without changing the SQL database fields (datetime, length =3D 8), is 

there a way to output the fields with formatting?

  

  Jonathan






Message #2 by Gregory_Griffiths@c... on Tue, 26 Sep 2000 15:14:29 +0100
Why not try using to_char(hire_date,'dd/mm/yyyy') or similar



-----Original Message-----

From: ajax@i... [mailto:ajax@i...]

Sent: 17 September 2000 16:31

To: asp_databases@p...

Subject: [asp_databases] Re: Formatting datetime









Use this SQL statement to get the date in the format dd Mon yyyy

 

select convert(char(11),hire_date,113 ) from employee

 

where hire_date is a date field with length 8 bytes

 

Cheers

AJAX>>>



----- Original Message ----- 

From: jonathan frascella 

To: ASP Databases 

Sent: Wednesday, August 30, 2000 2:15 PM

Subject: [asp_databases] Formatting datetime



I am trying to display the date and time that a user posts a message to 

a message board, but it keeps returning hundredths of a second too.

 

Without changing the SQL database fields (datetime, length = 8), is 

there a way to output the fields with formatting?

 

Jonathan




  Return to Index