Hi All,
I had this function working in an old project, but it was a while ago and was probably on a different DB and server type.
Currently, on a NodeJS server and PostgreSQL DB, the ‘dateAdd’ formatter does not work on a TIME field that is being returned by a DB query.
If I try to set a value (to test it) and apply the dateAdd formatter, it simply does not return any value (not even an empty value)
The same thing happens if I try to apply the formatDate function, once if apply it to a TIME field values or server values, it does not out put any result.
It will only work if the DB field type is dateTime and not just time.
Is this a bug or working as its meant to?
It seems a bug as i want to be able to manipulate the time field in a server action but now have to change it to a dateTime field and make every time have the same date just to perform dateAdd functions.
Input appreciated
I think this might help: time.addMinutes(30).formatDate(“h:mm a”)
it’s what I had to use in place of old version: time.dateAdd(“minutes”,30).formatDate(“h:mm a”)
Thanks for the response…i’ll check it out
1 Like
I did try this, but I’m not sure how you got it working as addMinutes
doesn’t appear to be a function you can use in Server Connect.
typing it manually results in a error such as:
"Parser Error: Formatter \"addMinutes\" does not exist, expression {{time.addMinutes(30).formatDate('h:mm a')}}"
Sorry about that…
Try something like this: {{$_POST.time.dateAdd(“minutes”,105).formatDate(“h:mm a”)}} – {{$_POST.time.dateAdd(“minutes”,165).formatDate(“h:mm a”)}}
This works on every test:
{{var_date.datetime.addMinutes(10).formatDate(‘MMMM dd, yyyy – H:mm A’)}}
Meeting Date: {{var_date.datetime.addDays(15).formatDate('MMMM d, yyyy')}}
Meeting Time: {{var_date.datetime.addMinutes(15).formatDate('H:mm A')}}
I believe I didn’t read the NodeJS. What I know about NodeJS is __________.