none
Generate a Number RRS feed

  • General discussion

  • string yr;
    string 
    moday;
    string 
    hr;
    int 
    sec;
    string 
    hexsec;
    yr Hex((dtvar.Year - 2000)).Substring((Hex((dtvar.Year - 2000)).Length - 1));
    moday ("00" + Format(dtvar, "y")).Substring((("00" + Format(dtvar, "y")).Length - 3));
    hr ((char)((dtvar.Hour + 65)));
    sec ((dtvar.Minute * 60
                + dtvar.Second)
    ;
    hexsec ("00" + Hex(sec).ToString()).Substring((("00" + Hex(sec).ToString()).Length - 3));
    GenerateDocNumber (yr 
                + (moday + (
    "-" 
                
    + (hr + hexsec))));
    Tuesday, June 5, 2012 2:10 PM

All replies

  • is there a question in there somewhere?

    This signature unintentionally left blank.

    Tuesday, June 5, 2012 3:17 PM
  • Hi, 

    Do you have any specific rules to generate unique Id? providing more details help us to solve your query.

    If not you can use Guid right?


    If this post answers your question, please click "Mark As Answer". If this post is helpful please click "Mark as Helpful".

    Tuesday, June 5, 2012 3:47 PM
  • Hi Manju,

    Welcome to the MSDN Forum.

    Since there is no question in your thread, I changed this thread type to discussion.

    If not, please feel free to change it back and make the question more clear.

    Thank you.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, June 6, 2012 9:44 AM
    Moderator