The moose likes XML and Related Technologies and the fly likes mm-dd-yy hh:mi - dateTime format (xs:dateTime) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "mm-dd-yy hh:mi - dateTime format (xs:dateTime)" Watch "mm-dd-yy hh:mi - dateTime format (xs:dateTime)" New topic

mm-dd-yy hh:mi - dateTime format (xs:dateTime)

kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1372
I need to set the date pattern like this mm-dd-yy hh:mi instead of xs:dateTime default value YYYY-mm-ddThh:mi:ss. Which xs: data type supports ? can i include pattern for this ?
Roseanne Zhang
Ranch Hand

Joined: Nov 14, 2000
Posts: 1953
I don't know the general approach on this problem. Is there one?

However, you always can derive from xsd:string class, and restrict it to a regular expression pattern.

Here is an example I wrote several year ago. Take a look:

kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1372
I tried with xs:string dataType and restricted the format and length thru regular expression pattern. But doesn't work. Any sample pattern for
mm-dd-yy hh:mi?
kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1372
Any update ?
Rahul Nair
Ranch Hand

Joined: Dec 01, 2007
Posts: 138

Can you tell me how to inset current DateTime in table column in Database ?

I had given DateTime as a datatype in my table filed. But i am also confused about which type i have to use to store Login time of user in the database ?

I am talking about MySQL 5.0 in Java Language.

I agree. Here's the link: http://aspose.com/file-tools
subject: mm-dd-yy hh:mi - dateTime format (xs:dateTime)
Similar Threads
Blind dates.
Date format in Sun Vocher.
SCJP voucher date format.
Date format
strange error for displaying date