Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
kri shan
Ranch Hand
Posts: 1478
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1478
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1478
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any update ?
 
Rahul Nair
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic