File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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
Author

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:
http://bobcat.webappcabaret.net/javachina/faq/xschema_01.htm#schema_015

Thanks!
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
Hello,

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.

Thanks
 
jQuery in Action, 2nd edition
 
subject: mm-dd-yy hh:mi - dateTime format (xs:dateTime)