标签: current-time

iPhone:如何获得当前毫秒?

获得当前系统时间毫秒的最佳方法是什么?

iphone time timestamp ios current-time

219
推荐指数
12
解决办法
23万
查看次数

获取SQL Server中的当前日期?

如何在MS-SQL Server 2008 R2中获取当前日期?

我的数据库中列的格式是DATETIME,日期以以下格式存储:

+++++++++++++ Vrdate ++++++++++
|                             |
|   2012-11-18 00:00:00.000   |
|   2012-11-19 00:00:00.000   |
|   2013-11-18 00:00:00.000   |
|   2012-12-01 00:00:00.000   |
|   2010-10-09 00:00:00.000   |
|   2012-11-11 00:00:00.000   |
|                             |
+++++++++++++++++++++++++++++++
Run Code Online (Sandbox Code Playgroud)

我搜索但无法找到以这种格式获取日期的方式(即哪个时间与之相关00:00:00.00).我找到了GETDATE()函数但是它提供了当前时间以及日期,我想要的是以下列格式获取日期:CurrentDate 00:00:00.00

我怎么能得到这个?

sql sql-server datetime sql-server-2008 current-time

70
推荐指数
2
解决办法
29万
查看次数

将结果与今天的日期进行比较?

有没有办法Now()在SQL中使用函数来选择具有今天日期的值?

我在印象中Now()会包含时间和日期,但今天的日期会有时间设置00:00:00,因此这永远不会匹配?

sql sql-server current-time

66
推荐指数
5
解决办法
30万
查看次数

如何在SQL中获取当前日期时间?

想要current datetime插入lastModifiedTime列.我正在使用MySQL数据库.我的问题是:

  1. SQL中是否有可用的功能?要么

  2. 它是实现依赖所以每个数据库都有自己的功能吗?

  3. MySQL中可用的功能是什么?

sql database current-time

25
推荐指数
5
解决办法
11万
查看次数

Java随机化字符串

我试图在不使用任何Random()函数的情况下生成无意义的单词。我发现我可以使用当前时钟或鼠标坐标。我选择使用当前时钟。这是我写的代码。

private final char[] charray = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',
    'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};

private char getRandomCharacter(){
    return charray[random(charray.length)];
}

private int random(int value){
    value =(int) System.nanoTime()% 52;
    return value;
}

protected Randomizer(){
    boolean running = true;
    int count = 0;
    int max = 5;
    while(running){
        StringBuilder sb = new StringBuilder();
        int size = random(25) + random(25);
        for (int i = 0; i < size; i++) {
            sb.append(getRandomCharacter());
        }
        System.out.println("Random Line : " + sb.toString());

        if (count++ == max) {
            running = false;
            System.out.println("All of them …
Run Code Online (Sandbox Code Playgroud)

java random nanotime random-seed current-time

6
推荐指数
1
解决办法
361
查看次数

Testcafe - 处理视频

我正在测试一个带有嵌入式视频的页面,使用控制台我可以播放、停止和获取当前播放时间。

当我尝试将其转换为 Testcafe 时,出现错误。这是我在控制台上的工作:

var vid = document.querySelector('.video-tech')
if (vid.paused === false) {
  vid.pause();
} else {
  vid.play();
}
document.querySelector('.video-current-time-display').innerText // 0:33
Run Code Online (Sandbox Code Playgroud)

然后我尝试使用 Testcafe 语法获取这些元素:

const playVideo = ClientFunction(() => {
      document.querySelector('.video-tech').play();
    });

const pauseVideo = ClientFunction(() => {
      document.querySelector('.video-tech').pause();
    });
Run Code Online (Sandbox Code Playgroud)

到现在为止还挺好。问题是我不能使用 If-Else 语句和ClientFunction.

我的目标是从 中获取文本current-time-display并让视频播放几秒钟,然后停止。

javascript video jquery-selectors testcafe current-time

5
推荐指数
1
解决办法
393
查看次数

如何在 Kotlin 标准库(多平台)上获取当前的 unixtime

我有一个 Kotlin 多平台项目,我想在共享代码中获取当前的 unixtime。

你如何在 Kotlin 标准库中做到这一点?

datetime standard-library unix-timestamp kotlin current-time

5
推荐指数
2
解决办法
600
查看次数

sqlite:如何选择 current_timestamp 作为自 1970 年 1 月 1 日以来的毫秒值

sqlite> select typeof(date('now'));
text
sqlite> select typeof(current_time);
text
sqlite> select typeof(current_date);
text
Run Code Online (Sandbox Code Playgroud)

如何选择当前日期/时间作为自 1970 年 1 月 1 日以来的毫秒整数值?

sqlite current-time

5
推荐指数
1
解决办法
2309
查看次数

如何在sql server中获取当前/今天的日期数据

如何编写查询以获取今天的日期数据SQL server

select * from tbl_name where date = <Todays_date>
Run Code Online (Sandbox Code Playgroud)

sql sql-server current-time

3
推荐指数
2
解决办法
3万
查看次数

显示当前时间 WPF

我发现定期显示当前时间更新的唯一方法是使用计时器。当然,我可以实现INotifyPropertyChanged一些在 UI 上使用的特殊属性,但是这个实现 AFAIK 也需要Timer. 例如像这里。有没有更好的方法来显示当前时间?

编辑

澄清一下:是否有任何声明性方法可以使用这样的 XAML 语法使其在没有计时器的情况下实时工作?

<Label Content="{x:Static s:DateTime.Now}" ContentStringFormat="G" />
Run Code Online (Sandbox Code Playgroud)

没有什么能阻止我在这里使用计时器。我只想知道是否有更优雅和紧凑的实现方式。

c# wpf xaml real-time current-time

2
推荐指数
2
解决办法
8326
查看次数