Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I need to insert a specific format in the Name field of a Salesforce object.
Example: Name: F - Check - 19-06-2019 - 30-06-2019.
The first date is the date of today.
The second date is the end of the month date.
In my tMap I used:
- TalendDate.getLastDayOfMonth (TalendDate.addDate (TalendDate.getCurrentDate (), 0, "MM")): for the end-of-month date
- TalendDate.getCurrentDate () for today.
The result is as presented: F - 20190614 - Wed 31 Jul 04:56:40 CDT 2019 - Tue. Jul 23 04:56:40 CDT 2019
Can you help me adapt both dates?
Thank you.
Hi,
you just need convert date to string
TalendDate.formatDate("dd-MM-yyyy", TalendDate.getLastDayOfMonth (TalendDate.getCurrentDate ())) - end of Month TalendDate.formatDate("dd-MM-yyyy", TalendDate.getCurrentDate ()) - today
Hi,
you just need convert date to string
TalendDate.formatDate("dd-MM-yyyy", TalendDate.getLastDayOfMonth (TalendDate.getCurrentDate ())) - end of Month TalendDate.formatDate("dd-MM-yyyy", TalendDate.getCurrentDate ()) - today
Hello ,
I just start to working with Talend Studio, its great .
I try to insert the Date in my output file in new column with this var ( talendDate )
but i have an error message .
could you help me ?
Kr
Alex
@vapukov wrote:
Hi,
you just need convert date to string
TalendDate.formatDate("dd-MM-yyyy", TalendDate.getLastDayOfMonth (TalendDate.getCurrentDate ())) - end of Month TalendDate.formatDate("dd-MM-yyyy", TalendDate.getCurrentDate ()) - today
@Alexis_Sandvik , you don't use the function correctly, go to Repository-->Routines-->System and open the TalendDate routine, you will read the source code of this function.
addDate(Date date, int nb, String dateType)
If you can't still get it works, please describe your requirement with a bit details.
Regards
Shong