Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

hi all

i got some problem 2 save my date value to the database

 

im usinng this command in vb .net

 

dim todayDate as DateTime = DateTime.Today

 

i assigned todayDate to a textBox and i can see the date of today.

 

but after i save it to the database the value become

20/02/2004 0:00:00

y this happen?

pls help me i am stuck!!!

thx in advance.

Posted

I find it's always best to format dates with a non-numerical month. That way, there is never any ambiguity regarding which part is the day and which is the month.

 

dd-MMM-yyyy is my preferred date format.

TT

(*_*)

 

There are 10 types of people in this world;

those that understand binary and those that don't.

Posted

is working good

now i have another problem

 

lets say i have a column Date in my table and 3 rows of record

for example

22/01/2003, 24/02/2003/, 31/01/2002

 

im using sql statement "select max (Date) from table" to show the latest late. The date return by this statement is suppose to be 24/02/2003 rite?

 

but the result is 31/01/2002

 

after i key in some different date, i found that the sql statement will the select the maximum value of the day only.

 

so how i show the latest date?

pls help me!!!

:(

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...