I've created a modules for an international company which adds tickets(jobs) to a database and gives specific people rights to alter those tickets.
The problem I have is additions of datetime. Every stored procedure (Select, Insert, Update) begins with :-
'SET DATEFORMAT dmy; INSERT INTO......' etc.
All SQLDatasource scripts begin with the same.
If someone adds a record, after clicking the UK locale, he/she can alter the record as many times as they want. If someone attempts to alter that record at a later date using the US locale I get the following error:-
Arithmetic overflow error converting expression to data type datetime. The statement has been terminated.
Can anyone help?
I used to use '
session.LCID = 2057' before I started using DNN, is there something you could recommend?
Every record MUST be added in the UK format. The US mdy or ymd will not be acceptable by the Company because they access the data from differnt software which requires the date to be in the UK format.
PS When populating the formview1 I specify DateTime.now and populating/updating uses the following:-
Public
Shared Sub FormViewUpdateEventHandler(ByVal sender As Object, ByVal e As _
System.Web.UI.WebControls.FormViewUpdateEventArgs) _
Handles FormView1.ItemUpdating
e.NewValues(
"ChangedAt") = DateTime.Now
e.NewValues(
"ChangedBy") = Entities.Users.UserController.GetCurrentUserInfo.DisplayName
Can anyone help?
Alex