dateformat

Crystal Reports 2008: C#: Edit Date format on the fly

I'm modifying a report at runtime in c# .Net using Crystal Reports 2008. I'm having trouble modifying a date fields format. I have accessed the DateFieldFormat object, and modified the properties, but only the SystemDefaultType property seems to have any affect. If the Date format is set in the Visual Report Designer I can see the deta...

Java date format to JavaScript date format

Hi, I would like to be able to convert a Java date format string, e.g. dd/MM/yyyy (07/06/2009) to a JavaScript date format string, e.g. dd/mm/yy (07/06/2009). Has anyone done this before, or got any idea where I might find some code that already does this? Thanks in advance. Edit: Thanks for all the replies but now I realise my mis...

Date format problem using SSIS for Excel into SQL Server

Hi, I am trying to import a column of dates from a spreadsheet in Excel 2003 into SQL Server 2005 using SSIS. I am in the UK so want dates formatted as dd/MM/yyyy. Unfortunately, the column in the spreadsheet contains a mixture of dates stored as strings in dd/MM/yyyy (with Excel 'General' formatting) as well as dates using Excel 'Dat...

What date format is "ds1248083197360"?

As the question states, what date format is "ds1248083197360" ? Is this a standard date format or a custom one to an application? ds1248083197360 is 20/07/2009 (or in US format, 07/20/2009) ...

Displaying a date with a custom timezone.

Lets say I have a string that represents a date that looks like this: "Wed Jul 08 17:08:48 GMT 2009" So I parse that string into a date object like this: DateFormat formatter = new SimpleDateFormat("EEE MMM dd HH:mm:ss ZZZ yyyy"); Date fromDate = (Date)formatter.parse(fromDateString); That gives me the correct date object. Now I wan...

where does asp and iis 6.0 get its date format

I've found a dilly of a pickle with a new web server. We have a new web server that is displaying dates differently than our old web servers. We are running asp classic web pages on IIS 6.0 with windows server 2003. We have logged in as an administrator and set the regional settings as appropriate and then applied the settings to curr...

Getting mySQL date_format to display in PHP

Hi, This could sound like a very simple question to many of you, but I seem to be having trouble getting a basic date_format to work with my mySQL statement and then to be displayed using php. Here is the code that I currently have: $result = mysql_query("SELECT *, DATE_FORMAT('timestamp', '%W %D %M %Y') as date FROM articleDB WHERE ...

Parsing standard date to GMT

Hey guys, Can someone show me a piece of java code that parses this date: 2009-08-05 INTO THIS GMT DATE: 2009/217:00:00 ==== what i have so far is: java.text.SimpleDateFormat format = new SimpleDateFormat("yyyy-mm-dd"); java.util.Calendar cal = Calendar.getInstance(new SimpleTimeZone(0, "GMT")); format.setCal...

Working with dates in asp.net

How do I process a date that is input by the user and store it in the database in a date field? The date is entered by the user using a jquery datepicker in a text field. Here are specific needs I have: 1. How do you convert a mm/dd/yy string (the jquery picked can produce any format) to a format storable in the database as a date field...

How to display a date as ISO8601 with JSTL?

something like? <fmt:formatDate value='${event.starttime}' type='both'/> ...

Java Date Format that allows - / or . as separators within date

What's the nicest way to parse a date that can be in one of the following formats "dd-MM-yyyy HH:mm" "dd/MM/yyyy HH:mm" "dd.MM.yyyy HH:mm" without creating 3 SimpleDateFormats and parsing against each one. Thanks ...

Human readable and parsable date format in Java.

I want to save a Date object to a readable string (for example 22/10/2009 21:13:14) that is also parsable back to a Date object. I have tried many things and the best I could find was to use DateFormater for parsing and formating but it has a setback. When you format a date you lose seconds information. I tried to find if there is an op...

Javascript formatting date strangely

My locale settings are : Short Date Format : dd/mm/yyyy , Long Date Format dd MMMM yyyy so why does var d = new Date("8/10/2009") alert(d.toLocaleDateString()); throw up 10 August 2009 or var d = new Date("15/10/2009"); throw up 10th March 2010 ...

Manipulating dates in Javascript without the Date object

It appears I can't use the javascript Date object as it inherintly defaults to US dates when you initialise with a datestring. There is no way of passing any culture information to the date object I.e. No matter what the clients locale settings are var d = new Date("08/10/2009") will always create a date object representing the 10th Au...

Date as simple text (e.g. Today, Yesterday, 1 Week Ago) in .Net

Hi, Does anyone have a simple function to hand for converting a date to a simple string (using .Net)? E.g. 14-Oct-09 would read "Today", 13-Oct-09 would read "Yesterday" and 7-Oct-09 would read "1 Week Ago" etc... Cheers, Tim ...

Parsing a date with short month without dot

Hello, I have a String that represents a date in French locale : 09-oct-08 : I need to parse that String so I came up with this SimpleDateFormat : String format2 = "dd-MMM-yy"; But I have a problem with the month part, that seems to be expected with a ending dot : df2.format(new Date()); gives me : 28-oct.-09 What is no...

ASP.NET MVC - XVal clientside validation of dates

I'm having some problems with xVal's clientside validation when it comes to dates. I can't get it to work with a swedish date format which is yyyy-mm-dd, it only seems to work with mm/dd/yyyy. Is there a way to make it work with other date formats? ...

how to change default dateformat AAAA-MM-DD to dd/mm/yyyy in Django?

My locale dateformat is dd/mm/yyyy and Django is requering AAAA-MM-DD when the user inputs 04/11/2009 Django raises: _('Enter a valid date in YYYY-MM-DD format.')) Im using simple html input field type="text", Not forms.DateField Thanks :) ...

Localized date and numberformats in GWT

I have a monolingual GWT application (English) and I would like to use localized date and number formats. I have added <inherits name="com.google.gwt.i18n.I18N"/> to my gwt.xml, but the formats remain in en-us. I have checked the browser lacale using this script private native String getBrowserLocale() /*-{ return navigator.langu...

Formatting time on Android, while following preferences (24 hr clock vs. AM/PM, etc..)

I'm currently using the following code to format time on Google Android: DateFormat.getDateTimeInstance().format(millis) While this code honors my timezone and locale settings, it ignores the '24 hour mode' setting in system preferences, always returning time in AM/PM. Is there any way to get time in the same format as that on the sta...