I am writing the code to get the data from ax in to excel, but date field is coming is like as 01-05-2016 10:23:34
i want only date..
*This post is locked for comments
This will work :)
xlsWorkSheet.cells().item(row,2).value(date2Str(budgetTmpBalanceLocal.Period, 123, 2, DateSeparator::Hyphen, 2, DateSeparator::Hyphen, 2,true));
Output:
01-05-2016
budgetTmpBalanceLocal.Period is already a date so you cannot convert date to date.
Could you please try to use xlsWorkSheet.cells().item(row,2).value(strfmt('%1', budgetTmpBalanceLocal.Period));
Hi ievgen Miroshnikov,
In Debugger it is showing Date in excel sheet it is showing as Date time.
I am already Try this But it is Showing Error.
Argument 't' is incompatable with the required type.
xlsWorkSheet.cells().item(row,2).value(DateTimeUtil::date(budgetTmpBalanceLocal.Period));
Hi srinivas pamidi,
You can use DateTimeUtil::date() to convert date time to date in x++ code.
You can easily convert datetime to date, but I can't comment on your code, because you didn't tell us anything about it. Also you can change the format in Excel.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,188 Super User 2024 Season 2
Martin Dráb 230,030 Most Valuable Professional
nmaenpaa 101,156