eCharcha.Com   Support eCharcha.Com. Click on sponsor ad to shop online!

Advertise Here

Go Back   eCharcha.Com > eCharcha Lounge > SoapBox

Notices

SoapBox Speak up, speak on, speak your heart out!

Reply
 
Thread Tools Display Modes
  #1  
Old March 25th, 2002, 11:51 AM
echarcha's Avatar
echarcha echarcha is offline
Sutradhar {admin}
 
Join Date: Jul 2000
Location: CA, USA
Posts: 44,601
echarcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond repute
Using Visual Basic/VbScript to convert Unix Time Stamp

Hey computer gurus at eCharchans -

I have a quick question.

Currently I have a SQL Server database table with a column which is a INTEGER. It stores a UNIX time stamp. I have to display this as a human readable format.

I know that if I had the liberty of PERL, PHP or JAVA , JSP then this would not be an issue. I am not such an expert at VB or VBScript.

Is there a ready script or quick way to achieve this conversion. Have ben searching google and Micrsoft site with no sucess
__________________
eCharcha.com
-Loud and Proud Desi Opinions
Reply With Quote
  #2  
Old March 25th, 2002, 12:04 PM
nayasavera
Guest
 
Posts: n/a
try this

try this. did not try it myself. but the problem description is very much like what u wrote.

http://www.devx.com/free/tips/tipvie...ontent_id=2941

And if it works, unblock my id . u know what its is right!!!
Reply With Quote
  #3  
Old March 25th, 2002, 12:09 PM
echarcha's Avatar
echarcha echarcha is offline
Sutradhar {admin}
 
Join Date: Jul 2000
Location: CA, USA
Posts: 44,601
echarcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond repute
Thanks nayasavera

but which ID.. I have not blocked any ids recently.. Please PM me.
__________________
eCharcha.com
-Loud and Proud Desi Opinions
Reply With Quote
  #4  
Old March 25th, 2002, 12:14 PM
nayasavera
Guest
 
Posts: n/a
Talking

It used to be coolfella...

trying to be transparent u c..

pls check pm
Reply With Quote
  #5  
Old March 25th, 2002, 12:15 PM
DesiBaba's Avatar
DesiBaba DesiBaba is offline
Chosen One
 
Join Date: Jul 2001
Location: Umm..rika!!
Posts: 11,941
DesiBaba has a reputation beyond reputeDesiBaba has a reputation beyond reputeDesiBaba has a reputation beyond reputeDesiBaba has a reputation beyond reputeDesiBaba has a reputation beyond reputeDesiBaba has a reputation beyond reputeDesiBaba has a reputation beyond reputeDesiBaba has a reputation beyond reputeDesiBaba has a reputation beyond reputeDesiBaba has a reputation beyond reputeDesiBaba has a reputation beyond repute
coolfella?? khanbaba's jamura???
__________________
Chosen One baby..Chosen One fo life..
kehtay hain waqt har zakham bhar deta hain; magar waqt hi mera zakham hai. Waqt nay mujhay pataa nahi kya banaa diya,varna main bhi kabhi insaan tha..
sometimes I sit and look at life from a different angle,dunno if I m God's child or Satan's angel
Reply With Quote
  #6  
Old March 25th, 2002, 12:17 PM
nayasavera
Guest
 
Posts: n/a
??

kaun khanbaba ??
Reply With Quote
  #7  
Old March 25th, 2002, 12:17 PM
DesiBaba's Avatar
DesiBaba DesiBaba is offline
Chosen One
 
Join Date: Jul 2001
Location: Umm..rika!!
Posts: 11,941
DesiBaba has a reputation beyond reputeDesiBaba has a reputation beyond reputeDesiBaba has a reputation beyond reputeDesiBaba has a reputation beyond reputeDesiBaba has a reputation beyond reputeDesiBaba has a reputation beyond reputeDesiBaba has a reputation beyond reputeDesiBaba has a reputation beyond reputeDesiBaba has a reputation beyond reputeDesiBaba has a reputation beyond reputeDesiBaba has a reputation beyond repute
Re: ??

Quote:
Originally posted by nayasavera
kaun khanbaba ??

sorry man...
__________________
Chosen One baby..Chosen One fo life..
kehtay hain waqt har zakham bhar deta hain; magar waqt hi mera zakham hai. Waqt nay mujhay pataa nahi kya banaa diya,varna main bhi kabhi insaan tha..
sometimes I sit and look at life from a different angle,dunno if I m God's child or Satan's angel
Reply With Quote
  #8  
Old March 25th, 2002, 12:31 PM
echarcha's Avatar
echarcha echarcha is offline
Sutradhar {admin}
 
Join Date: Jul 2000
Location: CA, USA
Posts: 44,601
echarcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond repute
Is there a reverse routine

Now can you convert a human readable date to a UNIX time using VB/ASP

Desibaba can we keep this thread on-topic?
__________________
eCharcha.com
-Loud and Proud Desi Opinions
Reply With Quote
  #9  
Old March 25th, 2002, 12:46 PM
GpeL's Avatar
GpeL GpeL is offline
Pelu Pelu
 
Join Date: Jun 2001
Location: Yahaan vahaan jaahaan tahaan
Posts: 19,171
GpeL has a reputation beyond reputeGpeL has a reputation beyond reputeGpeL has a reputation beyond reputeGpeL has a reputation beyond reputeGpeL has a reputation beyond reputeGpeL has a reputation beyond reputeGpeL has a reputation beyond reputeGpeL has a reputation beyond reputeGpeL has a reputation beyond reputeGpeL has a reputation beyond reputeGpeL has a reputation beyond repute
SQL: select datediff(ss,"01/01/1970",getdate())
__________________
GpeL a day
Keeps mischief away.
Reply With Quote
  #10  
Old March 25th, 2002, 12:49 PM
DesiBaba's Avatar
DesiBaba DesiBaba is offline
Chosen One
 
Join Date: Jul 2001
Location: Umm..rika!!
Posts: 11,941
DesiBaba has a reputation beyond reputeDesiBaba has a reputation beyond reputeDesiBaba has a reputation beyond reputeDesiBaba has a reputation beyond reputeDesiBaba has a reputation beyond reputeDesiBaba has a reputation beyond reputeDesiBaba has a reputation beyond reputeDesiBaba has a reputation beyond reputeDesiBaba has a reputation beyond reputeDesiBaba has a reputation beyond reputeDesiBaba has a reputation beyond repute
Re: Is there a reverse routine

Quote:
Originally posted by echarcha

Desibaba can we keep this thread on-topic?

e buddy
__________________
Chosen One baby..Chosen One fo life..
kehtay hain waqt har zakham bhar deta hain; magar waqt hi mera zakham hai. Waqt nay mujhay pataa nahi kya banaa diya,varna main bhi kabhi insaan tha..
sometimes I sit and look at life from a different angle,dunno if I m God's child or Satan's angel
Reply With Quote
  #11  
Old March 25th, 2002, 12:58 PM
Big-G's Avatar
Big-G Big-G is offline
Senior eCharchan
 
Join Date: Mar 2001
Posts: 11,578
Big-G has much to be proud ofBig-G has much to be proud ofBig-G has much to be proud ofBig-G has much to be proud ofBig-G has much to be proud ofBig-G has much to be proud ofBig-G has much to be proud ofBig-G has much to be proud ofBig-G has much to be proud of
Unix date format is about storing the date as number of seconds to have elapsed after Jan 1, 1970.

Conversion to and from this format can be done by writing a simple subroutine which converts seconds to hours, days etc. and vice versa. But I am sure VB must be having some predefined funtions for the same.
__________________
Having a smoking section in a restaurant is like having a pissing section in a pool!
Reply With Quote
  #12  
Old March 25th, 2002, 12:59 PM
nayasavera
Guest
 
Posts: n/a
http://ashutoshsaxena.tripod.com/jst...art/ch032.html

idhar bhi kuchh de rakha hai... shaayad date object ko getMilliseconds message do it returns number of milli secs since that 1970 date.

but this is javascript.. will work in asp
Reply With Quote
  #13  
Old March 25th, 2002, 01:02 PM
nayasavera
Guest
 
Posts: n/a
Quote:
Originally posted by Big-G
Unix date format is about storing the date as number of seconds to have elapsed after Jan 1, 1970.

Conversion to and from this format can be done by writing a simple subroutine which converts seconds to hours, days etc. and vice versa. But I am sure VB must be having some predefined funtions for the same.
sahi bola Bade G..

aisa kuchh karke insert maar dena.. charcha

var now = new Date();
var ms = now.getMilliseconds();
Reply With Quote
  #14  
Old March 25th, 2002, 01:08 PM
nayasavera
Guest
 
Posts: n/a
thodi galti ho gayi maalik getTime() num of millsec return karta hai
getmillisec..() nahin
Reply With Quote
  #15  
Old March 25th, 2002, 04:43 PM
echarcha's Avatar
echarcha echarcha is offline
Sutradhar {admin}
 
Join Date: Jul 2000
Location: CA, USA
Posts: 44,601
echarcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond reputeecharcha has a reputation beyond repute
Okay folks

http://javascript.internet.com/equiv...converter.html

This has a very good example in Javascript.

Unfortunately ASP 3.0 or VBscript does not have such simple Javascript style implementation of the getDate() function


I solved my problem. I suggested that we do this page in JSP..
__________________
eCharcha.com
-Loud and Proud Desi Opinions
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
February 13th, UNIX Time Will Reach 1234567890 echarcha Computing 3 February 15th, 2009 10:09 AM
Need help with Visual Basic 6 echarcha Computing 18 February 10th, 2004 09:20 PM
Visual Basic Beginner's question echarcha Computing 5 September 3rd, 2003 04:02 PM
Help: Visual Basic 6.0 siffar SoapBox 2 August 24th, 2003 07:23 AM
learning Visual Basic 6 y2k SoapBox 4 June 10th, 2002 05:05 PM


All times are GMT -7. The time now is 01:25 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Site Copyright © eCharcha.Com 2000-2012.