Convert Time Zone

Convert Time Zone

object ScriptedField()
{
	String source = Starfish.OriginData["DATETIMERECEIVED"].ToString();
	DateTime dt = Convert.ToDateTime(source);
	TimeZoneInfo timeInfo = TimeZoneInfo.FindSystemTimeZoneById("Pacific Standard Time");
	return TimeZoneInfo.ConvertTime(dt, TimeZoneInfo.Utc, timeInfo);
}
    • Related Articles

    • Scripting Class Object

      From within VBScript operations (ScriptedVariable, VBScriptProcedure, ScriptedField) in additional to normal VBScript functions, the developer has access to a custom “Starfish” class. The tables below define its usage. This class may also be used ...
    • Microsoft SQL Server Connector

      Overview The "SQL Server" Connector pulls data from Microsoft SQL Server. Using rowversion fields Many integrations run frequently and only want to pick up records modified since the last time the integration ran. This can be accomplished with ...
    • Use the same job to loop through multiple origins

      This example looks at reading from multiple mailboxes for email. Use a variable in the origin connection string. If the job needs to run for another mailbox, it calls the GotoJob function in the “Once After Conn” and pass in the Job's ID. Similar ...
    • Retrieve Records Modified After Last Run DateTime

      To only run data modified after the last time Starfish was run, we need to do two things: Set the last time Starfish ran. Filter the origin based on the last time Starfish ran. Set Last Run DateTime Create an After Operation Procedure and run the ...
    • Working with Variables

      StarfishETL variables can be used to store configurable information used by jobs and scripts. In the example below, several Variables have been defined. Use the following steps to walk through Viewing variables Selecting and changing a variable ...