Re: [flexcoders] String To Date Conversion

2009-05-27 Thread Tom Chiverton
On Wednesday 27 May 2009, Manish Jethani wrote:
>   var d:Date = new Date(Date.parse(s));

Note Date.parse() has issues: 
http://www.rachaelandtom.info/content/could-go-my-head-ya-know

-- 
Helping to confidentially maximize cross-platform bricks-and-clicks 
interactive cross-media meta-services as part of the IT team of the year, '09 
and '08

Tom Chiverton
Developer
Tel: +44 0161 618 5032
Fax: +44 0161 618 5099 
tom.chiver...@halliwells.com
3 Hardman Square, Manchester, M3 3EB
www.Halliwells.com



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of 
members is available for inspection at the registered office together with a 
list of those non members who are referred to as partners. We use the word 
?partner? to refer to a member of the LLP, or an employee or consultant with 
equivalent standing and qualifications. Regulated by the Solicitors Regulation 
Authority.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged. If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents. If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 2500.

For more information about Halliwells LLP visit www.Halliwells.com.
 

Re: [flexcoders] String To Date Conversion

2009-05-27 Thread Manish Jethani
On Tue, May 26, 2009 at 6:17 PM, yogesh patel
 wrote:

>   I have a String like "Tue May 26 18:12:55 IST 2009". How to
> convert this string into Date object ?

 var s:String = "Tue May 26 18:12:55 IST 2009";
  s = s.replace(/IST/, "UTC+0530");
  var d:Date = new Date(Date.parse(s));
  trace(d);

Manish


RE: [flexcoders] String To Date Conversion

2009-05-26 Thread Kenneth Sutherland
First thing you need to do is to convert the timezone IST into whatever
its difference is from GMT.  (I have no idea what timezone IST is, so
this is not accurate).

So your string Tue May 26 18:12:55 IST 2009" would turn into Tue May 26
18:12:55 GMT -0200 2009" once you've done this then you can parse the
string.

 

var time : String = 'Tue May 26 18:12:55 GMT -0200 2009';

//Day Mon DD HH:MM:SS TZD 

var num : Number = Date.parse(time);

var date : Date = new Date(num);

 

That's it. Be 

 

HTH

 

 

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of yogesh patel
Sent: 26 May 2009 13:47
To: flexcoders@yahoogroups.com
Subject: [flexcoders] String To Date Conversion

 






 

 

Dear all ,

  I have a String like "Tue May 26 18:12:55 IST 2009". How to
convert this string into Date object ?



Thanks & Regards,
 Yogesh Patel

 



Own a website.Get an unlimited package.Pay next to nothing.*
Click here!.
<http://in.rd.yahoo.com/tagline_ysb_website/*http:/in.business.yahoo.com
/> 







Explore and discover exciting holidays and getaways with Yahoo! India
Travel Click here!
<http://in.rd.yahoo.com/tagline_Travel_1/*http:/in.travel.yahoo.com/> 



Disclaimer 
---
This electronic message contains information which may be privileged and 
confidential. The information is intended to be for the use of the 
individual(s) or entity named above. If you are not the intended recipient, be 
aware that any disclosure, copying, distribution or use of the contents of this 
information is prohibited. If you have received this electronic message in 
error, please notify us by telephone on 0131 476 6000 and delete the material 
from your computer. 
Registered in Scotland number: SC 172507. 
Registered office address: Quay House 142 Commercial Street Edinburgh EH6 6LB. 

This email message has been scanned for viruses by Mimecast.
---

RE: [flexcoders] String To Date Conversion

2009-05-26 Thread Jake Churchill
new Date( Date.parse( your_string_variable ) );

 

Jake Churchill
CF Webtools
11204 Davenport, Ste. 100
Omaha, NE  68154
 <http://www.cfwebtools.com> http://www.cfwebtools.com
402-408-3733 x103

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of yogesh patel
Sent: Tuesday, May 26, 2009 7:47 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] String To Date Conversion

 







 

 


Dear all ,

  I have a String like "Tue May 26 18:12:55 IST 2009". How to
convert this string into Date object ?



Thanks & Regards,
 Yogesh Patel

 

  _  

Own a website.Get an unlimited package.Pay next to nothing.* Click here!.
<http://in.rd.yahoo.com/tagline_ysb_website/*http:/in.business.yahoo.com/> 





  _  

Explore and discover exciting holidays and getaways with Yahoo! India Travel
Click <http://in.rd.yahoo.com/tagline_Travel_1/*http:/in.travel.yahoo.com/>
here!



No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.339 / Virus Database: 270.12.39/2133 - Release Date: 05/25/09
08:16:00



[flexcoders] String To Date Conversion

2009-05-26 Thread yogesh patel


Dear all ,

  I have a String like "Tue May 26 18:12:55 IST 2009". How to convert 
this string into Date object ?



Thanks & Regards,
 Yogesh Patel




   Own a website.Get an unlimited package.Pay next to nothing.* Click here!.


  Cricket on your mind? Visit the ultimate cricket website. Enter 
http://beta.cricket.yahoo.com