Converting CF Session variables to a date format - date

Is it possible to convert ColdFusion session variables into a date format as such MM/DD/YYYY?
Right now what was created were three drop downs Month, Day, Year:
Ex. Aug 5 1986
The user wants these drop downs instead of just having one date picker. But then on the form they want that date in the format as of MM/DD/YYYY.
I have it showing as #session.checkout.info.birthmonth_1# #session.checkout.info.birthday_1# #session.checkout.info.birthyear_1#
Is it some how possible to convert those three variables into that date format?

It sounds like you want to use the CreateDate(year, month, day) function
Or in your case
session.checkout.info.birthdate = CreateDate(
session.checkout.info.birthyear_1,
session.checkout.info.birthmonth_1,
session.checkout.info.birthday_1);
The you can use a date formatting function to display as needed
#session.checkout.info.birthdate.LSDateFormat()#
Source: https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-functions/functions-c-d/CreateDate.html

Related

How to get the next Bi-weekly date based on a given start date and today's date in Google Sheets

I am trying to get bi-weekly dates based on a start date that would then provide the next upcoming date following the 14-day sequence from the start date, to get me the date that comes after today's date.
For example, if the start date is 6/15/2022, I would want the date every 14 days, and using today's date, I want to get the immediate next date that would still follow the 14-day sequence. Using today's date (6/30/2022), the next date I should get is 7/13/2022, which follows the 14-day sequence, since if you do MOD(DateDif(6/15/2022, 7/13/2022, "D"),14), you will get zero.
More Examples
Start Date: 6/15/2022
Today's Date: 6/30/2022
Next Needed Date: 7/13/2022
Today's Date: 7/14/2022
Next Needed Date: 7/27/2022
I only want to show the single next date, so I do not want to use sequence() or transpose() to fill up multiple rows/columns.
Any suggestions would be helpful, thank you.
try:
=B1+(14*ROUNDUP((TODAY()-B1)/14))

Google App Script - how to set date with timezone in AdminReports.UserUsageReport.get()

I'm using Apps Script and trying to extract data from AdminReports.UserUsageReport.get('all', 'the date') (to get classroom last interaction timestamps), but it always comes with records from another day. For example, if I extract from the 5th, the report brings the 6th together, until 7 o'clock in the morning.
The date parameter is a string and in the documentation says the following:
Represents the date the usage occurred. The timestamp is in the ISO
8601 format, yyyy-mm-dd. We recommend you use your account's time zone
for this.
But if the parameter is a string in yyyy-mm-dd format, how am I going to pass the date with the right time zone?
This code not work:
var myDate = new Date(2021,5,5);
var timezone = Session.getScriptTimeZone();
var date = Utilities.formatDate(myDate, timezone, 'yyyy-MM-dd');
var page = AdminReports.UserUsageReport.get('all', date);
How do I use the date correctly?
Thanks a lot.
If the report dates are UTC, then each may first be converted to JavaScript Date objects using
var myDate = new Date('report_date_string');
The second two lines of your code look like they should follow correctly in converting and formatting the Dates to strings in your local time zone.

MS Access: Show string in the date field when empty

I'm looking to have my field show "dd-mmm-yy" when a date is not entered into the field, so members don't get confused and frustrated when they try to put in a date such as 11/12/20 and don't realize it needs to be in day day, month month month, year year format. Is this possible to do through the property sheet?
[date format]
You can set the Format property of the textbox to:
dd-mm-yyyy;;;"dd-mm-yyyy"
though I believe it will add more confusion than help.
Another method for speedy input of dates is shown in my article:
Entering ISO formatted date with input mask and full validation in Microsoft Access

how can i get the value from datapicker using angular day, month, and year separate

am using angular 6 datepicker i need to get the date selected, separate day and month and year
this.search_form.controls["startDate"].value
console.log("full date",this.search_form.controls["startDate"].value);
console.log("day",this.search_form.controls["startDate"].value.date().toString());
console.log("month+1",this.search_form.controls["startDate"].value.month().toString()+1);
console.log("year",this.search_form.controls["startDate"].value.year().toString());
I need to get day=3 month=4 year=2019 also get the date as 03/4/2019
Use for separate date ,month n year
See the example below:-
Overview for datepicker
The datepicker allows users to enter a date either through text input, or by choosing a date from the calendar. It is made up of several components and directives that work together
Basic Datepicker:-
Connecting a datepicker to an input
A datepicker is composed of a text input and a calendar pop-up, connected via the matDatepicker property on the text input.
If you want to set the start date you have to use the 'startAt' property of the .
To select month and year you have to use monthSelected and yearSelected property of the

How do I set Date AND time picker in MDriven?

I am trying to capture both date and time in MDriven, but the default for data type DateTime only shows a picker (in Web) for the date, but a time is stored in the persistency layer. How do I also capture the time?
I found this in the wiki.mdriven.net
Date-formatting You set date and time format in the Style attribute
enclosed in { }.
For example, for dates and time, {short} will show date and time in
compact format. The default date format is {shortDate}. Please refer
to the Angular guide for formatting dates
https://docs.angularjs.org/api/ng/filter/date
The date and time format are automatically localized depending on the
browser.