Hi Team,
I need to pass only "2022-02" to fromdate variable which is of data type date from FromdateOfPreviousAddress ("2022-02-01") of data type date, i used the below logic
fromdate=TextToDate(FormatDateTime(FromdateOfPreviousAddress,"yyyy-MM"))
but fromdate returns only null date
Hello R. Kar,
To save value of data type date or dateTime you have to save a complete and correct format of date consists of day, month and year.
For your case I may suggest to safe date as firt day of each month for example for "2022-2" save it as "2022-02-01" then while you displaying value you can display it again as “2022-02"
As another solution you can save month in a separate column of type integer and year in separate column of type integer then concatenate them for display or create date variable equal NewDate(year, month, day)
Hi Mostafa,
Its not for displaying,need to pass that date to an api with the format yyyy-mm which is of data type date
You will not able to send date in this format of month and year only.
If Json attribute of type date so you need to send full date day, month and year.
If its string you can send string of month and year only
Hi,
Remove the text to date function from your expression. yyyy-MM formatted text cannot be converted back to date. You need to pass it as string to the API.
Regards,
Daniel