Integration Server 11.1 | Built-In Services Reference Guide | Date Folder | Summary of Elements in this Folder | pub.date:stringToDate
 
pub.date:stringToDate
WmPublic. Converts a String value to a Date object.
Input Parameters
inString
String Date or time in the string format that you want to convert to a Date object.
pattern
String Pattern string that describes the format of inString. For pattern-string notation, see Pattern String Symbols.
timezone
String Optional. Time zone in which you want the input date and time expressed. Specify a time zone code as shown in Time Zones (for example, EST for Eastern Standard Time).
If you do not specify timezone, the value of the server's "user timezone" property is used. If this property is not set, GMT is used.
locale
String Optional. Locale in which the date is to be expressed. For example, if locale is en (for English), the pattern EEE d MMM yyyy will produce Friday 23 August 2002, and the locale of fr (for French) will produce vendredi 23 août 2002.
If locale is not specified, Integration Server uses the value of the watt.server.session.locale.ignore server configuration parameter to determine whether the locale is obtained from the session used by the client that invoked the service or if the locale is the locale of Integration Server.
Output Parameters
date
Object The output date, which is of the java.util.Date wrapper type. This is dependent on the timezone specified. If nothing is specified, then the Integration Server timezone is used.
Usage Notes
When you provide the input date, pattern, and timezone, the service automatically calculates the output date according to the specified timezone. For regions where Daylight Saving Time (DST) is observed, the service automatically adjusts the output date to reflect DST changes.
You must ensure that the date you provide as inString matches the specified pattern.