Question : Convert a date from "yyMMddHHmmss" into "yyyy-MM-dd HH:mm:ss" format

i got the date yyMMddHHmmss this format, how do i convert this into "yyyy-MM-dd HH:mm:ss format using java code

Answer : Convert a date from "yyMMddHHmmss" into "yyyy-MM-dd HH:mm:ss" format

Sorry, I don't know of an existing one, but if you use BigStringEditor and UITypeEditor for the "?"s, and define a class BigStringEditor as in the included code (sorry, I don't have VB.Net on my machine, but the code should be almost the same) then when you click in the property a "..." will appear (I think you need to set Browsable(true) also)  and if you click on that a 100x100 dialog will appear which will let you edit.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
public class BigStringEditor: UITypeEditor
    {
        public override UITypeEditorEditStyle GetEditStyle(System.ComponentModel.ITypeDescriptorContext context)
        {
            return UITypeEditorEditStyle.Modal;
        }

        IWindowsFormsEditorService editorService = null;

        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            if (provider != null)
            {
                editorService =
                    provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService;
            }

            if (editorService != null)
            {
                Form foo = new Form();
                TextBox tb = new TextBox();
                tb.Multiline = true;
                tb.Height = 100;
                tb.Width = 100;
                foo.Height = 100;
                foo.Width = 100;
                tb.Text = value.ToString();
                foo.Controls.Add(tb);
                editorService.ShowDialog(foo);
                return tb.Text;
            }

            return value;
        }


    }
Random Solutions  
 
programming4us programming4us