Hi,
We have a problem with taking wrong date value (The date varying between the system date and Set property date which has written in the Microstation c# code) in the database at the time of posting from Microstation.
We are using Bentley Map Enterprises v8i SS3 and registered features using Bentley Geo Spatial Administrator. Below image shows the registered date format field from GSA.
We have opened DGN with Oracle spatial connection once registration has done .After that we placed registered feature and posted successfully. Below are the C# code for set the property of a feature.
objxftfeature.SetProperty("QA_DATE",DateTime.Now.tostring());
After posting we have observed in the properties, date field value shows as "Input string was not in a correct format."
Date field Values are stored in the database as shown in below snap shot.
But my system shows the date & time as 2/22/2013 12:02:15 PM.
Could you please help me out this problem. Thanks in advance.
Regards
Rama Krishna
Hi Rama,
I have no much experience with Oracle posting, but what crossed my mind:
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Hi Jan,
Thanks for your quick response. As per your suggestion we used SetTypeAndValue for a feature and successfully stored QA_DATE Value in microstation. but we observed in database the date values updated wrongly at the time of posting from Microstation. Please suggest me.
Thanks,
Any new information about this? I've noticed a similar problem: in a VBA application, I'm creating a new feature. I take the current time with the Now function, set the feature property, and post the feature. In my case, the time in database and feature (as seen with the Analyze Feature command) will always be exactly three hours ahead.
Hi MSi,
I think your post looks more like new question than the extension of this thread, because as you wrote, it's similar problem not probably the same and also in some aspect VBA is not C#, despite of it uses pretty the same API.
I can guess only, but in my opinion the problem can be how time is recognized. You have not provided enough information and also I have to tell I am not database expert. Does the time shift you mentioned relate to your time zone?