Default current time to Eastern Standard time - infopath2010

I have an Infopath form (linked to a sharepoint 2010 list) that contains a text box field that shows the current time. My problem is that some of my target users are working in different time zones and I want the field to calcualte the current time in Eastern Standard time.
Im currently using this formula as the default value for the text box:
substring-after(now(), "T")
Is there a way to manipulate this function to show the current time in EST. If not, then im open to any suggestions.
Thank you,

Related

Powerapps time values reflecting incorrectly (often just set to default) when adding or pulling from a Sharepoint List of Date and Time values

I have a list in Sharepoint that includes the following snippet:
When I use a gallery in Powerapps, and link this list to it, the date and time display shows a different value for the time. For example, entry number 1's date and time look like this: 07/01/2022 19:40.
So the date has been converted to something else.
I don't know how to address it. Can anyone help?
Good question!
Sharepoint actually saves your times in UTC. This means that once PowerApps loads that time and corrects it to your time zone, the date and time could be different.
https://learn.microsoft.com/en-us/previous-versions/office/sharepoint-csom/jj164700%28v%3doffice.15%29
Basically, you take the UTC time and add your local time difference, that gives you the correct one :)

Is there a way to use VBA to change the language in VBA generated worksheets?

I was assigned a project at work to develop a Macro that would automatically take financial data from an Excel table and generate credit notes and invoices for customers. I have the Macro developed already it is working the way it should, but the issue I am running into is with the language that is used for each invoice.
When generating credit notes, the Macro is taking the the invoices month of issue from the financial data table and displaying then as them as the months where credit was issued to the customer. i.e., a customer is requesting a partial refund on transactions from a period of time (say Feb.2019 - Apr. 2019) it will be displayed as:
February 2019 (02-19) -20.20
March 2019 (03-19) -32.03
April 2019 (04-19) -24.21
The problem is that my primary working language is English, but my company works in several European marketplaces and the invoices and credit notes have to be displayed in the language of the market where the customer is located.
So if an Italian customer requests an invoice, the months displayed must be listed as
Febbraio 2019 (02-19) -20.20
Marzo 2019 (03-19) -32.03
Aprile 2019 (04-19) -24.21
However, when running the Macro it still displays the issuing months in English when it should be displayed in the language of the market. The entirety of all invoices and credit notes created with this Macro are generated in the correct language, but since the Macro is taking the issuing months from the data table it automatically displays them in English.
Is the any way to ensure that it displays the issuing months in the required language?
I already know that the language settings can be changed for the entire workbook, but I still run into the same problem as I would have to manually change the issuing language each time I run the Macro to ensure the issuing month is correct?
To format a date in another regional setting you need to change the number format of the date for the desired range of cells. Eg. format the cell pressing Ctrl+1 to get the following dialog, and choose the regional setting ("Gebietsschema") for the country you desire.
Image 1: Change the regional setting for the date (sorry for the German screenshot).
Alternatively use the Range.NumberFormat property to format the cell with VBA:
.NumberFormat = "[$-it-IT]d mmmm yyyy;#"
Note that these both work if your dates are real date values but don't work if your dates are text. If they are text you need to change them into real dates.

Modify SharePoint view of lookup field that can have multiple values

I am trying SharePoint for first time. So please be nice to me. Here is what I am trying to do.
Lets say I have a List where I have values as shown below
Lesson Days
----------------------
Tennis Monday,Wednesday
Swim Saturday
Golf Sunday,Saturday.
Above Days is lookup field that can take multiple values.
How can I modify the view to look as below
Lesson Days
----------------------
Tennis Monday
Wednesday
Swim Saturday
Golf Monday
Sunday
Saturday
Looks like we can code, but I have no idea how to do this.
Also it would be awsome if we have sequence number for multiple values. Something like this
Lesson Days
----------------------
Tennis 1.Monday
2.Wednesday
Swim 1.Saturday
Golf 1.Monday
2.Sunday
3.Saturday
Edit: Based on further search looks like I need to do Client side rendering. I found this link
SharePoint 2013 Client Side Rendering: List Views
I am still struggling to understand this. Need much simple example on how to do this. Will appreciate any hint/help on getting this started.
To start this might help. Using Sample 1, changing the field name and the render function you can easily get the view version without sequence.
If you want a custom order on the days you have to change the EditForm for your days field to change the way the user inserts the days. That will be the hard part since if you do so, you have to either get the values for the lookup field by urself (using the javascript client api or rest calls) or use the default sharepoint lookupfield and customize it (I would not recommend this). To save the custom values back to the days field this example will help (using the registerGetValueCallback function)
You can include your script with a script webpart on the view page/edit page or use the jslink property on the webpart property section miscellaneous to include a javascript file containing the csr code.

How to edit external lists in sharepoint designer 2013

I currently have a simple external content type that displays a very small sql table on a external list in my SharePoint site. The problem is I have a date of birth field that gets formatted with the DateTime type instead of the Date type that is used when I created the SQL table. The biggest issue I am facing is the lack of designer view in SharePoint Designer 2013 that was included in 2010. Since I am forced to work with the source code, how do I go about formatting the date of birth fields so that it is displayed in simple Date format example: 01/01/2001. And also prevent the time from showing when adding or entering a new record to the list.
You could use a SELECT LEFTSQL statement to pull just the relevant information. Are you familiar with this method?
For clarification, here's an example:
CDate(Left([FieldName],10)
While being sure to change [FieldName] to match the field's name in your table.

How to get the Current Date & Time Automatically to a Date Time Field

I have created a date time field I made today's date as the default value, Then I added it to a page layout and created a page, But the current Date Time is not picking up from the system.
I dont want to give the user to select a Date Time instead it should populated automatically
Is there anyway to achieve this without writing code in code behind files?
This is very similar to this question I think
SO - How to get Date and current time from the Date/Time column in SharePoint Custom list
My answer there gives a few options such as using the built in Created field, using a calendar template, a JavaScript hack and a custom field type.
Guys, fake [Today] trick worked for us - but prob is we only got the date value not datetime.
Janis, is it possible to get date and time both from the fake [today] column trick? pls refer few articles on the same
Does [Today] work?
If you have language pack applied to SharePoint, then you must use localized "Today" string.

Resources