Get current date as string in databricks using scala
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2022 07:41 AM
I want to get current date in scala as a string for example today current date is 3rd jan, want to store it as a new variable dynamically as below, how to get it.
val currdate : String = “20220103”
when I am using val currdate = Calendar.getInstance.getTime then am not getting output in desired format as above.
- Labels:
-
Current Date
-
Scala
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2022 03:20 PM
@Vibhor Sethi - Thanks for your question. We will circle back around if the other members don't reply first. Thanks in advance for your patience.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2022 09:43 PM
Hi thanks. Could you please circle back around the question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2022 08:36 AM
@Vibhor Sethi - I'll pass this on to the team. Thank you. 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2022 11:46 AM
Thanks it worked
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2022 08:25 AM
Hey @Vibhor Sethi
Hope you are well!
Thank you for posting your question and letting us know that you were able to resolve the issue. Would you be happy to mark it as the best solution? It would be really helpful for the other members too.
Cheers!