473,386 Members | 1,841 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,386 software developers and data experts.

how to reverse a value in textbox1 and show in textbox2

seshu
156 100+
hi guys this might be a simple one for you but here i badly need it
i have a table in mysql which has a column with data type date
there date format is yyyy-mm-dd but here in vb date formate is quite reverse
so i thought of taking to textboes
like this
tb1.text=datestrig
tb2.text=?
it should be reverse of tb1.text
hope some one will help me
Nov 30 '06 #1
3 1465
I hope this wll help you.

string s = Convert.ToDateTime(txt1.Text).ToString("dd/MM/yyyy");
txt2.Text = s;

regards
karthi


hi guys this might be a simple one for you but here i badly need it
i have a table in mysql which has a column with data type date
there date format is yyyy-mm-dd but here in vb date formate is quite reverse
so i thought of taking to textboes
like this
tb1.text=datestrig
tb2.text=?
it should be reverse of tb1.text
hope some one will help me
Dec 4 '06 #2
hi guys this might be a simple one for you but here i badly need it
i have a table in mysql which has a column with data type date
there date format is yyyy-mm-dd but here in vb date formate is quite reverse
so i thought of taking to textboes
like this
tb1.text=datestrig
tb2.text=?
it should be reverse of tb1.text
hope some one will help me


try this code

txt2.text = strrev(txt1.text)
Dec 5 '06 #3
Why not format the datetime directly when querying MySQL. This could avoid manipulating date in your code...

SELECT
DATE_FORMAT(fldDateColumn, '%d-%m-%Y')
FROM
tblName

I have checked from MySQL Help
Dec 5 '06 #4

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

Similar topics

2
by: Ronny Sigo | last post by:
Hello all, I have made a form which takes input from the user (things like name,adress, reference number and so on). After filling in the form, the user presses a button. The program then takes...
7
by: cw bebop | last post by:
HTML code: <form id="Form1" method="post" runat="server"> <asp:TextBox id="TextBox1" style="Z-INDEX: 105; LEFT: 120px; POSITION: absolute; TOP: 64px" runat="server" Width="144px"></asp:TextBox>...
5
by: Claudia Fong | last post by:
Hi, I have 2 forms. Form1 has a button which calls form2, but I need to know the value of the form1.textBox1.text. When I show form2, I try to use the code bellow: textBox1.Text =...
4
by: I_AM_DON_AND_YOU? | last post by:
A simple query: I have a textbox with multiline=true. Also there is a button1. In button1's click the code written is textbox1.lines(0) = "Microsoft" textbox2.lines(1) = "Visual Basic" ...
2
by: XML newbie: Urgent pls help! | last post by:
Hi, I am getting the error: Value of type 'String' cannot be converted to '1-dimensional array of Long'. in the following line for TextBox2.Text field : ...
1
by: Luqman | last post by:
The detailview control is combination of textboxes and labels, while detailview is in edit mode, how can I change the textbox value through code ? For example: My detailView has following...
3
by: technocraze | last post by:
Hi community experts, May I knw whether is it possible to display the corresponding value of the second textbox based on the user input in the first textbox? This means that once the user enters...
2
jamesd0142
by: jamesd0142 | last post by:
Hi jus messing round with some simple encryption here... main problem is my return value does not get returned to the main process... ...
4
by: justice750 | last post by:
Hi All, I am using a FormView control. The allows me to update records in the database. However, when a database field is null I can not update the field on the form. It works fine when the field...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.