Setting DateTime Variable
I have a requiremet to send an Email to managers while a folder is in a specific stage. This email needs to be sent at 1:30 am.
I created a DateTime variable, which I need to set to the current date, but change the the time portion to 1:30 AM, when the folder enters this stage. Then I added a timer which loops back to the stage. I can set the timer to start the action 0 seconds after the datetime value of this variable.
For the life of me, I cannot figure out how to create a datetime value in Metastorm.
I tried CalculateDateTime, but it only seems to be able to create a date some period of time before or after the current date, or perhaps the folder deadline.
All I want to do is this: OutgoingFundsData.dtmAlert = 2013/01/01 01:30 00.000.
I must be missing something obvious here, this should be a simple thing to do.
Comments
-
Try this
System.DateTime s = new System.DateTime(2010, 1, 18);
Local. = s;0 -
It would be nice if they had an easier "truncate time" or "date only" option, but I can think of a few possible approaches off the top of my head (and others will have better ones).
- One, though some developers consider not ideal, is to create a flagged action in the stage in question, and have a flag raised (via Windows Task Manager for instance) at the time you want it to go off. This ensure just the times in question. This is an approach I use in a few locations.
- SelectSql(null,"SELECT CONVERT(NVARCHAR,GETDATE(),101)+' 1:30 am').DateTime
- Conjecture on my part, not verified by perhaps FormatDateTime(DateTime.CurrentDate,"MM/dd/yyy 01:30 AM")
0 -
Sorry, didnt read through your post... you can use something like this to create a current date with a time part
Local.= new System.DateTime(System.DateTime.Today.Year, System.DateTime.Today.Month, System.DateTime.Today.Day, 1, 30, 0);
or using folder deadline
Local. = new System.DateTime(ProcessContext.FolderDeadline.ToDateTime().Year, ProcessContext.FolderDeadline.ToDateTime().Month, ProcessContext.FolderDeadline.ToDateTime().Day,
1, 30, 0);0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 155 General Questions
- 148 Thrust Services
- 57 Developer Hackathon
- 37 Thrust Studio
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 32 eDOCS
- 190 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 9 XM Fax
- Follow Categories