473,402 Members | 2,064 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

how to put text+date to disable textbox?

i want to insert auto text in my textbox in vb.net 2005 mobile apllication
ex: TR070802221005
TR = transaction
070802 = yymmdd
221005 = hhmmss
so,i have a unique transaction_id if i use that one without click on the textbox.
thx.
Aug 2 '07 #1
4 1304
Plater
7,872 Expert 4TB
i want to insert auto text in my textbox in vb.net 2005 mobile apllication
ex: TR070802221005
TR = transaction
070802 = yymmdd
221005 = hhmmss
so,i have a unique transaction_id if i use that one without click on the textbox.
thx.
What is the question? how to create that string?
Look at the DateTime.ToString(string) overload function. You can pretty much do things like:
Expand|Select|Wrap|Line Numbers
  1. 'my VB is pretty bad, but this should be close
  2. Dim unstr as String;
  3. unstr="TR"&DateTime.Now.ToString("yymmddhhmmss");
  4.  
Aug 2 '07 #2
sorry,i cannot speak english very well,but thanks for your reply.and also i am new in vb .net.

but i want to know how to write the code to appear like this : TR070802221005?
i just explain 070802 is get from yymmdd
and 221005 is hhmmss

i cannot put text+dateNow like that in my textbox.
thx.
Aug 2 '07 #3
Plater
7,872 Expert 4TB
sorry,i cannot speak english very well,but thanks for your reply.and also i am new in vb .net.

but i want to know how to write the code to appear like this : TR070802221005?
i just explain 070802 is get from yymmdd
and 221005 is hhmmss

i cannot put text+dateNow like that in my textbox.
thx.
That's what I thought:
Expand|Select|Wrap|Line Numbers
  1. 'my VB is pretty bad, but this should be close
  2. Dim unstr as String;
  3. unstr="TR"&DateTime.Now.ToString("yymmddhhmmss");
  4. myTextbox.Text=unstr;
  5.  
Aug 2 '07 #4
Thanks! that answer my question

it's work!
but i have to change this one :
yymmddhhmmss to yyMMddhhmmss
because if 'm' still use lowercase, vb.net believe that we want 'minute' to appear. ;)
thank you very much.
Aug 2 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Gerry Viator | last post by:
Hi all, I have a textbox were a time is typed in like: upto 4 numbers 1900 300 1000 1425 I would like as they type the text to show todays date plus the time they
1
by: TN Bella | last post by:
Hello, I was looking through the older posts for a solution to this problem, but I am still confused on how to fix my problem. There are two dates on my form, one (txtInvDate) is entered by the...
4
by: dhnriverside | last post by:
Hi peeps I have a datepicker control that's providing dates in the format dd/mm/yyyy (UK). I want to convert this to "yyyy-mm-dd" to store as a text field in my database (had lots of problems...
1
by: Jose | last post by:
How make a textbox date without the datetimepicker? Thanks a lot
3
by: Jim in Arizona | last post by:
I have a gridview that's being populated from an access db query. The problem I'm having is that the date/time fields in access that are populating the gridview are showing both date and time, when...
4
by: Jon | last post by:
Hi, I used XslCompiledTransform with the following Xsl file. The <xsl:text disable-output-escaping="yes"does not work when using XslCompiledTransform to do the trnasform (namely the output...
2
by: Luqman | last post by:
Hi, Any Idea how to Display Todays Date in DetailView Template Field while Inserting ? For example: When I click on New Button of DetailView Control, I need to display Today's Date in a...
11
by: akirekab | last post by:
My need is to check an input date, like 01/10/492 and be able to recognize it is not correct date, and then enter a default date in that location. I have read and tried a few things, and am presently...
2
by: Mimi | last post by:
In Access 2007, I have successfully imported a text file with fixed width fields. However the import did not correctly interpret a date. In the text file the date field had no delimiter, was just...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.