Page 1 of 1

Date Format

Posted: Tue Feb 10, 2009 1:38 pm
by ormond
Is there any way to change the date format returned from calendar.asp to non US? i.e. dd/mm/yy. I've had a look around and gather this is an issue with Java IsDate(), but I don't know enough to change it.

Re: Date Format

Posted: Fri Sep 07, 2018 2:21 am
by FrankHolcomb
ormond wrote: Tue Feb 10, 2009 1:38 pm Is there any way to change the date format returned from calendar.asp to non US? i.e. dd/mm/yy. I've had a look around and gather this is an issue with Java IsDate(), but I don't know enough to change it.
DateFormat originalFormat = new SimpleDateFormat("MMMM dd, yyyy", Locale.ENGLISH);
DateFormat targetFormat = new SimpleDateFormat("yyyyMMdd");
Date date = originalFormat.parse("August 21, 2012");
String formattedDate = targetFormat.format(date); // 20120821

Also note that parse takes a String, not a Date object, which is already parsed.

Re: Date Format

Posted: Sat Sep 08, 2018 2:23 am
by FrankHolcomb
ormond wrote: Tue Feb 10, 2009 1:38 pm Is there any way to change the date format returned from calendar.asp to non US? i.e. dd/mm/yy. I've had a look around and gather this is an issue with Java IsDate(), but I don't know enough to change it.
Convert text dates by using the DATEVALUE function. To convert a text date in a cell to a serial number, use the DATEVALUE function. Then copy the formula, select the cells that contain the text dates, and use Paste Special to apply a date format to them.

Re: Date Format

Posted: Thu Feb 14, 2019 7:42 am
by JosephDon
Is the DATEVALUE function the only way to go about this?