Change DateTime from Now to Today

This commit is contained in:
Sergey Chebotar 2023-05-27 08:58:09 +03:00
parent e67d94f199
commit f620147515

View File

@ -161,7 +161,7 @@ public class RhSolutionsFunction
.GetResult()
.FirstOrDefault();
DateTime date = dateField == 0 ? DateTime.Now : DateTime.FromOADate(dateField);
DateTime date = dateField == 0 ? DateTime.Today : DateTime.FromOADate(dateField);
var exchangeRate = currencyClient.GetCurrencyCourse(date)
.GetAwaiter()
.GetResult();
@ -193,7 +193,7 @@ public class RhSolutionsFunction
if (ExcelAsyncUtil.Run("Database request", dateField, delegate
{
DateTime date = dateField == 0 ? DateTime.Now : DateTime.FromOADate(dateField);
DateTime date = dateField == 0 ? DateTime.Today : DateTime.FromOADate(dateField);
var exchangeRate = currencyClient.GetCurrencyCourse(date)
.GetAwaiter()
.GetResult();