Hi, does anyone know of a date format conversion bundle? I need to change dates from 31.12.2009 to 2009-12-31
On Mar 26, 2010, at 1:39 PM, c6y wrote:
Hi, does anyone know of a date format conversion bundle? I need to change dates from 31.12.2009 to 2009-12-31
I don’t know of one, but you could make a command pretty quickly using PHP. I suggest PHP because of its awesome `strtotime` function.
http://us.php.net/manual/en/function.strtotime.php
Thanks a lot! I don't want to take advantage of you, but if you had the time, how would you convert number formatting from 1.234,56 to 1,234.56 with regex and tmcommand?
Thanks again!
On Fri, Mar 26, 2010 at 11:21 AM, Hans-Jörg Bibiko bibiko@eva.mpg.dewrote:
On Mar 26, 2010, at 9:06 PM, Kai Vermehr wrote:
Thanks a lot! I don't want to take advantage of you, but if you had the time, how would you convert number formatting from 1.234,56 to 1,234.56 with regex and tmcommand?
Hmm, if the format is fix you can try:
perl -pe 's/,(?=\d{2}$)/./g;s/.(?!\d{2}$)/,/g'
--Hans
Wow, thanks so much, it works flawlessly!! :)
On Fri, Mar 26, 2010 at 1:17 PM, Hans-Jörg Bibiko bibiko@eva.mpg.de wrote: