we have migrated windows server linux server. trying redirect .aspx urls html urls. the static pages works fine if used redirect 301 /contact.aspx http://mysite.com/contact.html but when try add redirect like redirect 301 /products.aspx?cid=30&bid=5 http://mysite.com/category/books.html the redirect not working. any advice highly appreciated
here code using: string string = "08/07/2013".replace('/', '-'); date date = new simpledateformat("yyyy-mm-dd").parse(string); why date return: "wen jan 3 00:00:00 est 14"? not @ date format told use. edit: need format because database using requires format. the format use parse date string, not match it. using yyyy 08 . use following format: new simpledateformat("dd-mm-yyyy") and why @ replacing / - ? can build pattern original string only: string string = "08/07/2013" date date = new simpledateformat("dd/mm/yyyy").parse(string); and if want date string in yyyy-mm-dd format, can format date using dateformat#format(date) method: string formatteddate = new simpledateformat("yyyy-mm-dd").format(date); see also: change date format in java string simpledateformat java doc
Comments
Post a Comment