如何在 Inno Setup 中获取本地日期时间?
有没有办法在 Inno Setup 中获取本地日期时间戳?
Is there a way to get local date time stamp in Inno Setup ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
有没有办法在 Inno Setup 中获取本地日期时间戳?
Is there a way to get local date time stamp in Inno Setup ?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
答案取决于您何时需要它。
构建设置时需要。
您将需要使用 ISPP,它是快速入门包的一部分。
您可以使用
str GetDateTimeString(str, str, str)
函数。示例:
#define MyDateTimeString GetDateTimeString('dd/mm/yyyy hh:nn:ss', '-', ':');
ISTool(也是快速入门包的一部分)有一个很好的 ISPP 功能帮助文件,其中包括一页有关此功能的信息。
安装时需要。
虽然来源不同,但该函数也称为
GetDateTimeString
那么它一定是在一个pascal编码块中。
示例:
有关如何使用它的详细信息,请参阅帮助文件。
尽管这两个函数具有相同的名称,但使用它们时的上下文对于理解为什么您会获得一个值而不是另一个值非常重要。
The answer depends on when you need it.
Needed at the time the setup is built.
You will need to use ISPP which is part of the Quick Start pack.
You can use the
str GetDateTimeString(str, str, str)
function.Example:
#define MyDateTimeString GetDateTimeString('dd/mm/yyyy hh:nn:ss', '-', ':');
The help menu in ISTool (Also a part of the Quick Start Pack) has a good help file for ISPP functions including this one where there is a page of information on this function.
Needed at the time of install.
Although a different source, the function is also called
GetDateTimeString
Then it must be in a pascal coding block.
Example:
The details of how to use it are found in the Help File.
Although both functions have the same name, the context of when they are used is important to understanding why you would get one value over another.
我更新了你的代码:
I updated your code: