开发者

Any way to get how Domino server stores the date format

开发者 https://www.devze.com 2023-03-01 19:02 出处:网络
Could some one please let me know whether there is any 开发者_开发技巧way where in I can get the response from the Domino server as How the date format is stored.

Could some one please let me know whether there is any 开发者_开发技巧way where in I can get the response from the Domino server as How the date format is stored.

For example if the domino server stores the date as 02/08/2011 in mm/dd/yyyy format, the Domino server should return the date format as mm/dd/yyyy.

similarly if the domino server stores the date as 08/02/2011 in dd/mm/yyyy format, the Domino server should return the date format as dd/mm/yyyy.


The "International class" represents the international settings in the operating environment, for example, the Regional Settings in the Windows Control Panel. When settings change in the operating environment, Notes recognizes the new settings immediately. For remote (IIOP) operations (that't what you are doing), these settings represent the session's server.

The "International Class" has the properties you are looking for:

  • isDateDMY returns a boolean value that is true if the order of the date format is day-month-year.
  • isDateMDY returns a boolean value that is true if the order of the date format is month-day-year.
  • isDateYMD returns a boolean value that is true if the order of the date format is year-month-day.

But if you trying to get values out of a a Notes document, you could/should use the DateTimeValue property of the corresponding NotesItem, which returns a NotesDateTime object. And ths object has a toJavaDate method - which is probably what you want.


In Notes 8 running a LotusScript on the server you can use NotesInternational:

http://www.loganmachinists.com/help/help8_designer.nsf/f4b82fbb75e942a6852566ac0037f284/fb55765d3fed30a08525731b004a2eaf?OpenDocument


I know I'm late to the party here, but Domino does not store actual Date/Times as 'dd/mm/yyyy' etc, this is purely used when displaying Dates and Times for example, when using a DateTime Field, which will also display a proper date/time in the users local format. i.e. a UK or US user will see the same stored date/time displayed differently in their local format.

In Notes objects, Items, Fields and the Formula Language, Date/Time is handled as the number of seconds from January 1, 1 AD.

In LotusScript Date/Time is handled as a floating point variant, with the value to the left of the decimal point representing the number of days from January 1, 100 AD and to the right, the fraction of a day from midnight.

0

精彩评论

暂无评论...
验证码 换一张
取 消