Hi, is there a way to create your own date format? I am trying to create the format, DDMMMYYYY (eg. 05FEB2021). This is the international ICAO date format for aviation. None of the available formats are remotely acceptable or eligible.
I have tried to convert the format from one of the available formats in Thunkable in the hope that it could be used in my Google Sheet but this didn’t seem to work so I obviously cannot use the date picker either. See below:
Create a function to make it look like the format you want.
Hi @muneer, I cannot see how change date input format using a function because I think I am being restricted by the available formats somehow:
Please see my attempt in the blocks, I have tried various permutations to achieve this but I know something is wrong in my blocks but I cannot see or understand what it might be.
Ideally, I would like the whole app to use this date format.
Please make a feature request for this! It would be ideal to be able to dictate the exact formatting of the date displayed.
There’s a lot of room for improvement when it comes to getting/setting/displaying/manipulating dates
Ok @jared, how do I make a “feature request”?
Fill the filling form out and submit it here as a new “issue”
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I’m always frustrated when […]
Describe the solution you’d like
A clear and concise description of what you want to happen.
Describe alternatives you’ve considered
A clear and concise description of any alternative solutions or features you’ve considered.
Additional context Add any other context or screenshots about the feature request here.
Additional date formats would be great but… until then, you can use this conversion:
To try it out, see the screen with your username here:
Demo Project: Thunkable
The Date Input component needs to have this Style in the properties panel:
I did it this way thinking that the
Launch Picker will actually show the calendar to pick the date but it didn’t.
Yeah, the Launch Picker doesn’t seem to work very well. And there’s no documentation about it:
Thanks @tatiang and @muneer, I shall try this and I shall let you know how I get on.
Hi @tatiang, I have tried your suggestion and it works beautifully. See below:
However, is it possible for this to be placed in a text input field for entry into a Source Data Google Sheet in the “DDMMMYYY” format as in my Date Value field? See below:
So that when the date field is clicked on the Date Picker appears and when the user selects a date it will appear in the text/date field so that when it is saved, it will be to the Google Sheet in the DDMMMYYYY format. Or, am I overthinking it?
Hi @tatiang and @muneer, I have tried tatiang’s suggestion it worked great on my test sheet (see previous post) but now I have tried to integrate it into my project
My project link:
And by doing so I end up with the following entry into my Google Sheet (row 1698)
As you can see it has entered “DDMMMYYYY” into the date column instead of the date I selected which was “17JAN2022”. How can I remedy this?
Here are my blocks:
What block do I need to put in the “Date value” socket in my “create row” function to produce the correct format to be saved into my Google Sheet? I thought using the “call Data Input2"/ Get Date” block would be the solution but clearly it isn’t. I am a bit lost now.
Would you want to plug the return of the function you created into the createRow block?
Hi @jared, yes I think that is what I am after. I am trying use the date picker to insert my selected date into the “Date value” in the “Create row” block. But the DATE format returned must be the “DDMMMYYYY” format (ie 05FEB2022).
Hi @jared, I just tried plugging the “Convert Date to DDMMMYYYY” function into the “DATE value” in my “Create row” block (see below):
I then created a dummy new record (shown below):
The reconverted back to original format after entry (see below):
After saving entry via the app ( image below):
There was no produced in my Google Sheet (row 1699):
Could you please tell where I’m going wrong?
Hi @tatiang and @muneer, with regards to my date format issue, I was wondering if it was possible to save the value of the Date Label to a Google Sheet?
As the way that you have shown me is how to display the date in correct format (DDMMMYYY) to display on a label, I was wondering if could enter that label’s value as text into my Google Sheet. I might sound daft but I was wondering if I use that concept as a solution maybe?
You can use the value created by the function in ANY data source including a Google Sheet. After the date input is converted, it’s just a text string. It can be used just like any other text string or variable value.
I’ve updated the demo. You would use these blocks to add the result to a Google Sheet:
Demo project: Thunkable
Hi @tatiang, I have applied the amended blocks to my sheet and exchanged my “Date Input” box for a Label (AddRecLabelBox) instead. When the Label is clicked it launches the “Date Picker” See blocks below:
Curiously though, when I select a date from the date picker, my Label that the formatted date is suppose to appear on disappears altogether. At first, I thought it was perhaps that I had set the Label’s visibility to “false” but this was not the case. So I tried to resolve this by using a “wait for_ seconds” block set to 20 seconds, but the formatted Label still disappeared the moment the date was selected. See 2 images below:
Before date selected:
The Date Row and Formatted date Label are still visible.
After the date is selected (in this case 18JAN2022)
The formatted date Label vanishes. See below:
Because the formatted Label has vanished, there is no Date Entry made into my Google Sheet. As you can see, I have tried this several times and always received the same result. See below:
Do you know why the formatted Label would keep disappearing like that?
I can’t see anything mistakes (- in my novice opinion) of my blocks that I copied from you being wrong. In the Design area, the formatted Label is set to “Visible”.
How can I fix this issue?
You can share the project link with me if you like. I won’t be able to troubleshoot the Google Sheets issue completely without access to your Google Sheet but I can try it with my own and also take a look at the blocks to see why that might be happening and also why the label is disappearing. Labels don’t tend to disappear unless you’ve told them to.