Epoch Time - InfoPath Dev Sign in | Join | Help in General InfoPath (Entire Site) InfoPath Dev InfoPath Dev is dedicated to bringing you the information and tools you need to be successful in your Microsoft Office InfoPath development projects. Home Blogs Forums Photos Downloads InfoPath Dev » InfoPath » General » Epoch Time Epoch Time Last post 01-06-2009 06:35 AM by dlgross. 3 replies. Page 1 of 1 (4 items) Sort Posts: Oldest to newest Newest to oldest Previous Next 01-05-2009 01:38 PM dishmael Joined on 12-16-2008 Posts 9 Epoch Time Reply Contact I'm trying to save a file using a unique filename and wanted to use epoch time (unless there's a better way). Is there a function for epoch time? 01-05-2009 08:43 PM In reply to Jimmy Joined on 07-03-2008 Posts 2,595 Re: Epoch Time Mark as Not AnswerMark as Answer... Reply Contact Are you using code to call the save operation? This is a C# expression to obtain the epoch time: int epoch = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; Jimmy Rishe / Software Developer / Microsoft MVPQdabra Software 01-06-2009 04:55 AM In reply to dishmael Joined on 12-16-2008 Posts 9 Re: Epoch Time Mark as Not AnswerMark as Answer... Reply Contact I'm using a data connection and a rule on a button. When the button is clicked, the rule fires calling the submit data connection sending the form to a SharePoint site. Is there a way to use this code without signing the form? If not, is there a function I can call in a rule to get epoch seconds? Is there a better way for creating unique file names? 01-06-2009 06:35 AM In reply to dlgross Joined on 03-23-2006 USA Posts 271 Re: Epoch Time Mark as Not AnswerMark as Answer... Reply Contact I use a combination of the username, the current time and some values from the form to create a meaningful and unique name Dean DeanCharlotte, NC Page 1 of 1 (4 items) Copyright © 2003-2019 Qdabra Software. All rights reserved.View our Terms of Use.
Are you using code to call the save operation?
This is a C# expression to obtain the epoch time:
int epoch = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
I use a combination of the username, the current time and some values from the form to create a meaningful and unique name
Dean