diff options
author | Sergey Chebotar <s.chebotar@gmail.com> | 2023-05-27 08:58:09 +0300 |
---|---|---|
committer | Sergey Chebotar <s.chebotar@gmail.com> | 2023-05-27 08:58:09 +0300 |
commit | f6201475150863cc4d79c05d8a6db19df77ae63b (patch) | |
tree | 09e6001a4f218a8061edaa49ce42c0fc32a5e74e | |
parent | e67d94f1995f3de8c4d83eeddf71816589c6bcb5 (diff) |
Change DateTime from Now to Today
-rw-r--r-- | RhSolutions.AddIn/AddIn/RhSolutionsFunction.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/RhSolutions.AddIn/AddIn/RhSolutionsFunction.cs b/RhSolutions.AddIn/AddIn/RhSolutionsFunction.cs index 68acb10..b46a930 100644 --- a/RhSolutions.AddIn/AddIn/RhSolutionsFunction.cs +++ b/RhSolutions.AddIn/AddIn/RhSolutionsFunction.cs @@ -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(); |