如何在Inno Setup中获取本地日期时间? [英] How to get local date time in Inno Setup?

查看:702
本文介绍了如何在Inno Setup中获取本地日期时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在Inno Setup中获取本地日期时间戳?

Is there a way to get local date time stamp in Inno Setup ?

推荐答案

答案取决于您何时需要.

  • 建立设置时需要
  • 安装时需要.

建立设置时需要.

您将需要使用您可以使用str GetDateTimeString(str, str, str)功能.

示例:#define MyDateTimeString GetDateTimeString('dd/mm/yyyy hh:nn:ss', '-', ':');

ISTool (也是快速入门包的一部分)中的帮助菜单提供了一个很好的帮助文件ISPP功能包括此功能,其中有关于此功能的信息页面.

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.

安装时需要.

尽管来源不同,但该函数也称为GetDateTimeString 然后它必须在一个Pascal编码块中.

Although a different source, the function is also called GetDateTimeString Then it must be in a pascal coding block.

示例:

function DateTime : String;
begin
  result := GetDateTimeString('dd/mm/yyyy hh:nn:ss', '-', ':');
end;

有关使用方法的详细信息,请参见帮助文件.

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.

这篇关于如何在Inno Setup中获取本地日期时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆