Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: time stamp


Message #1 by "Sarah Margolis" <sarahmargolis@m...> on Wed, 28 Nov 2001 15:41:54 -0800
Dear ASPers,



I am trying to make a EasternST timestamp into a PacficST stamp.  Problem is

that I am trying to subtract a "3" from a time, so of course it doesn't work

because they are different data types, presumably.  Is there a way to "cast"

the time stamp into a number, or something like that so this can be done?

Let me know if I have to provide more details.  Thanks for your time.



Best,

Sarah



Message #2 by Simon Newton <simonn@h...> on Thu, 29 Nov 2001 09:58:59 +1000
This message is in MIME format. Since your mail reader does not understand

this format, some or all of this message may not be legible.



------_=_NextPart_001_01C17868.A5B3F210

Content-Type: text/plain;

	charset="iso-8859-1"





Try



<%

dim Var,f

f = "Your datestamp"

Var = Dateadd("h",-3,f)

response.write Var

%>



Simon.



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

From: Sarah Margolis [mailto:sarahmargolis@m...]

Sent: Thursday, 29 November 2001 9:42

To: ASP Databases

Subject: [asp_databases] time stamp





Dear ASPers,



I am trying to make a EasternST timestamp into a PacficST stamp.  Problem is

that I am trying to subtract a "3" from a time, so of course it doesn't work

because they are different data types, presumably.  Is there a way to "cast"

the time stamp into a number, or something like that so this can be done?

Let me know if I have to provide more details.  Thanks for your time.



Best,

Sarah





 



simonn@h...


$subst('Email.Unsub')



Read the future with ebooks at B&N

http://service.bfast.com/bfast/click?bfmid=2181&sourceid=38934667&categoryid

=rn_ebooks




Message #3 by David Cameron <dcameron@i...> on Thu, 29 Nov 2001 14:13:20 +1100
This message is in MIME format. Since your mail reader does not understand

this format, some or all of this message may not be legible.



------_=_NextPart_001_01C17883.CCBA4876

Content-Type: text/plain;

	charset="iso-8859-1"



Might not work. When you say timestamp, do you mean the data type timestamp

(SQL Server) or a datetime field?



For a SQL Solution to the problem assuming that is it a datetime field:



SELECT DATEADD(day, -3, MyDateField) AS MyDate

FROM MyTable



Same goes for inserts and updates.



regards

David Cameron

nOw.b2b

dcameron@i...



>  -----Original Message-----

> From: 	Simon Newton [mailto:simonn@h...] 

> Sent:	Thursday, 29 November 2001 9:59 AM

> To:	ASP Databases

> Subject:	[asp_databases] RE: time stamp

> 

> 

> Try 

> 

> <% 

> dim Var,f 

> f = "Your datestamp" 

> Var = Dateadd("h",-3,f) 

> response.write Var 

> %> 

> 

> Simon. 

> 

> -----Original Message----- 

> From: Sarah Margolis [ <mailto:sarahmargolis@m...>] 

> Sent: Thursday, 29 November 2001 9:42 

> To: ASP Databases 

> Subject: [asp_databases] time stamp 

> 

> 

> Dear ASPers, 

> 

> I am trying to make a EasternST timestamp into a PacficST stamp.  Problem

is 

> that I am trying to subtract a "3" from a time, so of course it doesn't

work 

> because they are different data types, presumably.  Is there a way to

"cast" 

> the time stamp into a number, or something like that so this can be done? 

> Let me know if I have to provide more details.  Thanks for your time. 

> 

> Best, 

> Sarah 

> 

> 

>   

> --- 


simonn@h... 


$subst('Email.Unsub') 

> 

> Read the future with ebooks at B&N 

>

<http://service.bfast.com/bfast/click?bfmid=2181&sourceid=38934667&categoryi

d=rn_ebooks> 

> 

> 




$subst('Email.Unsub')

> Read the future with ebooks at B&N

>

http://service.bfast.com/bfast/click?bfmid=2181&sourceid=38934667&categoryid

=rn_ebooks 





  Return to Index