Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
rgranado
Contributor III
Contributor III

Generate DateTime Records

Hi,

 

I need a suggestion on how to generate Datetime Records: HH:mm.  In HH24 format or even HH12.

 

Thanks.

Rhoda

Labels (2)
7 Replies
rgranado
Contributor III
Contributor III
Author

Hi, I found a solution to generate datetime records however, I didn't want to have the seconds just HH:mm. Is there a way to get rid of the ss?
TRF
Champion II
Champion II

Did you try
TalendDate.formatDate("HH:mm", TalendDate.getCurrentDate())
abhi90
Creator II
Creator II

U can generate any date type using Talenddate.formatdate
TRF
Champion II
Champion II

@rgranado, did this help you?
If so, thank's to mark your case as solved (Kudo also accepted).
abhi90
Creator II
Creator II

Hi @TRF,
This is not a question posted by me. So cant accept your solution 0683p000009MPcz.png
rgranado
Contributor III
Contributor III
Author

Hi

sorry I couldn't reply so quickly.  

 

I have done those changes and I am familiar with those functions.  I believe the format is dictated by the database component.    

0683p000009Lx0P.pngtmap date functions0683p000009Lx0Z.pngdb component DB Types0683p000009Lv9W.pngoutput

There might not be any solution on this component but if you have an alternative I would be gladly to hear it.

 

Thanks

 

 


datetable.PNG
Anonymous
Not applicable

@ rgranado

Talend appears to be processing as required.  That is the database query is showing 12:00:00. The problem is most likely the database itself and the default configurations it has in displaying the various data types. Check the query tool you are using and the default settings it has for displaying the time data type. If you require the database to save the time in a specific format you may need to look at a char field