Hello,
 This is a common problem we face during saving of Date Time variables into
the Database.
 There are many ways to do it..lets look at one.
 Put the field as DateTime only in the Database. But while inserting from
code to the database, u pass a string (either as a Parameter or by someother
means) like this.

sUniDate = dt.ToString("yyyy/MM/dd hh:mm:ss:ff") //dt is the date u picked
from Picker.

and u just pass this as the parameter to Db. It will take. Its a universal
format.

Another way:

sUniDate = dt.ToString("u") //Universal Sortable Date format.

If sUniDate.IndexOf("Z") > 0 Then //we need to remove the last Z or z
character.

sUniDate = sUniDate.Substring(0, sUniDate.IndexOf("Z"))

End If

Bye,

Praveen P


[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page
http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to